summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbuilder/modules.d/dnbd3-rootfs/hooks/copy-dnbd3-service-into-newroot.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/builder/modules.d/dnbd3-rootfs/hooks/copy-dnbd3-service-into-newroot.sh b/builder/modules.d/dnbd3-rootfs/hooks/copy-dnbd3-service-into-newroot.sh
index ee308af6..7f5dd1f6 100755
--- a/builder/modules.d/dnbd3-rootfs/hooks/copy-dnbd3-service-into-newroot.sh
+++ b/builder/modules.d/dnbd3-rootfs/hooks/copy-dnbd3-service-into-newroot.sh
@@ -13,8 +13,8 @@ logging.set_level debug
[[ "$SLX_LOG_FILE_PATH" == "" ]] && SLX_LOG_FILE_PATH=/var/log/openslx
logging.set_log_file "$SLX_LOG_FILE_PATH"
-systemd_system_unit_path="$(dirname "$(find / -name dracut-mount.service \
- -type f -print -quit)")"
+systemd_system_unit_path="$(dirname \
+ "$(systemctl show -p FragmentPath dracut-mount.service | cut -c 14-)")"
new_systemd_system_unit_path="${NEWROOT}/lib/systemd/system"
cp "${systemd_system_unit_path}/dnbd3root.service" \
"${new_systemd_system_unit_path}/dnbd3root.service"