summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xmodules.d/dnbd3-rootfs/hooks/copy-dracut-systemd-files-into-newroot.sh12
1 files changed, 8 insertions, 4 deletions
diff --git a/modules.d/dnbd3-rootfs/hooks/copy-dracut-systemd-files-into-newroot.sh b/modules.d/dnbd3-rootfs/hooks/copy-dracut-systemd-files-into-newroot.sh
index 58f23207..007b950d 100755
--- a/modules.d/dnbd3-rootfs/hooks/copy-dracut-systemd-files-into-newroot.sh
+++ b/modules.d/dnbd3-rootfs/hooks/copy-dracut-systemd-files-into-newroot.sh
@@ -1,8 +1,12 @@
-#!/usr/bin/env bash
-# -*- coding: utf-8 -*-
-type emergency_shell >/dev/null 2>&1 || source /lib/dracut-lib.sh
+#!/bin/bash
-# Copy out services over to stage 4, so they still appear in
+type emergency_shell &>/dev/null || source /lib/dracut-lib.sh
+
+# Copy dnbd3-client too, needed for controlling dnbd0
+mkdir -p "${NEWROOT}/opt/openslx/sbin"
+cp "$(which dnbd3-client)" "${NEWROOT}/opt/openslx/sbin/dnbd3-client"
+
+# Copy our services over to stage 4, so they still appear in
# systemd-analyze plot etc.
new_systemd_system_unit_path="${NEWROOT}/lib/systemd/system"