summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Bauer2019-11-29 15:57:56 +0100
committerJonathan Bauer2019-11-29 15:57:56 +0100
commitdef759afd57f1fe51cbe213b0a1bfd0f91b850d1 (patch)
tree3ad88aaa90d7b8917959bad50716811adb34a335
parent[slx-network] default to dhcp in stage4 (diff)
downloadsystemd-init-def759afd57f1fe51cbe213b0a1bfd0f91b850d1.tar.gz
systemd-init-def759afd57f1fe51cbe213b0a1bfd0f91b850d1.tar.xz
systemd-init-def759afd57f1fe51cbe213b0a1bfd0f91b850d1.zip
[dnbd3-rootfs] default for system partition
Since the packer/ansible is used to generate the stage4, set SLX_SYSTEM_PARTITION_IDENTIFIER to SLX_SYS by default.
-rwxr-xr-xbuilder/modules.d/dnbd3-rootfs/hooks/prepare-root-partition.sh14
1 files changed, 7 insertions, 7 deletions
diff --git a/builder/modules.d/dnbd3-rootfs/hooks/prepare-root-partition.sh b/builder/modules.d/dnbd3-rootfs/hooks/prepare-root-partition.sh
index a960d1e0..9bdd9a2c 100755
--- a/builder/modules.d/dnbd3-rootfs/hooks/prepare-root-partition.sh
+++ b/builder/modules.d/dnbd3-rootfs/hooks/prepare-root-partition.sh
@@ -87,19 +87,19 @@ else
fi
# Fail fast if unpacking dnbd3 image failed.
-[ -z "$read_only_device" ] && exit 1
+if [ -z "$read_only_device" ]; then
+ emergency_shell "Failed to unpack the qcow2 image!"
+fi
# endregion
# region find system partition within dnbd3 image
if [ -z "$SLX_SYSTEM_PARTITION_PREPARATION_SCRIPT" ]; then
if [ -z "$SLX_SYSTEM_PARTITION_IDENTIFIER" ]; then
- # if empty use whole device
- read_only_partition="$read_only_device"
- true
- else
- read_only_partition="$(slx-tools dev_find_partitions \
- "$read_only_device" "$SLX_SYSTEM_PARTITION_IDENTIFIER")"
+ SLX_SYSTEM_PARTITION_IDENTIFIER="SLX_SYS"
+ echo "SLX_SYSTEM_PARTITION_IDENTIFIER='$SLX_SYSTEM_PARTITION_IDENTIFIER'" >> /etc/openslx
fi
+ read_only_partition="$(slx-tools dev_find_partitions \
+ "$read_only_device" "$SLX_SYSTEM_PARTITION_IDENTIFIER")"
else
eval "$SLX_SYSTEM_PARTITION_PREPARATION_SCRIPT"
fi