diff options
4 files changed, 7 insertions, 3 deletions
diff --git a/builder/dnbd3-rootfs/hooks/mount/mount-root-device.sh b/builder/dnbd3-rootfs/hooks/mount/mount-root-device.sh index 5c1186ac..6b29d84b 100755 --- a/builder/dnbd3-rootfs/hooks/mount/mount-root-device.sh +++ b/builder/dnbd3-rootfs/hooks/mount/mount-root-device.sh @@ -1,3 +1,4 @@ mount /dev/mapper/root "$NEWROOT" -o subvol=root && \ # Write fstab for recognized system partition. -sed --in-place --quiet '/^LABEL=system.*/!s/.*//' "$NEWROOT/etc/fstab" +sed --in-place --quiet "/^LABEL=${SLX_SYSTEM_PARTITION_LABEL}.*/!s/.*//" \ + "$NEWROOT/etc/fstab" diff --git a/builder/dnbd3-rootfs/hooks/pre-mount/prepare-root-partition.sh b/builder/dnbd3-rootfs/hooks/pre-mount/prepare-root-partition.sh index 7d942ca3..c0fbfdca 100755 --- a/builder/dnbd3-rootfs/hooks/pre-mount/prepare-root-partition.sh +++ b/builder/dnbd3-rootfs/hooks/pre-mount/prepare-root-partition.sh @@ -13,9 +13,8 @@ fi local nbd_device='/dev/nbd0' && \ systemd-preserve-process-marker qemu-nbd --connect="$nbd_device" \ "$SLX_DNBD3_DEVICE" --read-only && \ -# TODO make partition label configurable. local read_only_partition="$(utils_create_partition_via_offset "$nbd_device" \ - system)" && \ + ${SLX_SYSTEM_PARTITION_LABEL})" && \ # Make read-only partition writable. # TODO implement persistent available indicator. local persistent="N" # 'P' for persistent storage, 'N' for not persistent diff --git a/builder/dnbd3-rootfs/hooks/pre-pivot/copy-openslx-configuration-into-newroot.sh b/builder/dnbd3-rootfs/hooks/pre-pivot/copy-openslx-configuration-into-newroot.sh new file mode 100755 index 00000000..662ebe07 --- /dev/null +++ b/builder/dnbd3-rootfs/hooks/pre-pivot/copy-openslx-configuration-into-newroot.sh @@ -0,0 +1,3 @@ +mkdir --parents "${NEWROOT}${SLX_CONFIGURATION_LOCATION}" +cp "${SLX_CONFIGURATION_LOCATION}config" \ + "${NEWROOT}${SLX_CONFIGURATION_LOCATION}config" diff --git a/dev-tools/example-openslx.config b/dev-tools/example-openslx.config index ef36d228..ab7c2965 100644 --- a/dev-tools/example-openslx.config +++ b/dev-tools/example-openslx.config @@ -3,6 +3,7 @@ SLX_DNBD3_SERVERS='132.230.4.201' SLX_DNBD3_RID='0' SLX_DNBD3_DEVICE='/dev/dnbd0' SLX_DNBD3_IMAGE='archLinux.vdi' +SLX_SYSTEM_PARTITION_LABEL='system' # TODO: Following parameter aren't supported yet. SLX_VM_NFS='132.230.4.1:/mnt/lehrpools/dnbd3' |