summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortorben2015-11-06 16:46:16 +0100
committertorben2015-11-06 16:46:16 +0100
commita9b4cc8b3caae927adba642c95992513b2866cd9 (patch)
tree4077a69e6cfaf62c0bc81c3a0d5fb4477be2f88a
parentfix (diff)
downloadsystemd-init-a9b4cc8b3caae927adba642c95992513b2866cd9.tar.gz
systemd-init-a9b4cc8b3caae927adba642c95992513b2866cd9.tar.xz
systemd-init-a9b4cc8b3caae927adba642c95992513b2866cd9.zip
Add process marker.
-rwxr-xr-xbuilder/dnbd3-rootfs/hooks/pre-mount/prepare-root-partition.sh7
1 files changed, 4 insertions, 3 deletions
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 a1a8159d..c257607d 100755
--- a/builder/dnbd3-rootfs/hooks/pre-mount/prepare-root-partition.sh
+++ b/builder/dnbd3-rootfs/hooks/pre-mount/prepare-root-partition.sh
@@ -7,15 +7,16 @@ declare -rg DNBD3_DEVICE="/dev/dnbd0"
# Close previous connections to be able to run this script many times.
dnbd3-client --device "$DNBD3_DEVICE" --close && \
-if ! dnbd3-client --host "$DNBD3_SERVER" --image "$DNBD3_IMAGE" --device \
- "$DNBD3_DEVICE" --rid "$DNBD3_RID"
+if ! systemd-preserve-process-marker dnbd3-client --host "$DNBD3_SERVER" \
+ --image "$DNBD3_IMAGE" --device "$DNBD3_DEVICE" --rid "$DNBD3_RID"
then
warn "Failed to connect $DNBD3_IMAGE from $DNBD3_SERVER to $DNBD3_DEVICE"
emergency_shell -n "Error in $0"
return 1
fi
local nbd_device='/dev/nbd0' && \
-qemu-nbd --connect="$nbd_device" "$DNBD3_DEVICE" --read-only && \
+systemd-preserve-process-marker qemu-nbd --connect="$nbd_device" \
+ "$DNBD3_DEVICE" --read-only && \
# TODO make partition label configurable.
local read_only_partition="$(utils_create_partition_via_offset "$nbd_device" \
system)" && \