From 50f04a04d2015b3fceb912674655cacd1513dc77 Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Thu, 19 Oct 2017 11:18:45 +0200 Subject: ask systemctl where dracut-mount is ... instead of searching it with find which might yield false positives... --- .../modules.d/dnbd3-rootfs/hooks/copy-dnbd3-service-into-newroot.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'builder') 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" -- cgit v1.2.3-55-g7522