diff options
| author | torben | 2016-03-22 13:56:26 +0100 |
|---|---|---|
| committer | torben | 2016-03-22 13:56:26 +0100 |
| commit | 02a40901a96a1a8caba8f35f6b59a94b0f1330f2 (patch) | |
| tree | bdd7de274014cebb6355e1de73627a4c1503312f /builder | |
| parent | Remove qemu-img dependency. (diff) | |
| download | systemd-init-02a40901a96a1a8caba8f35f6b59a94b0f1330f2.tar.gz systemd-init-02a40901a96a1a8caba8f35f6b59a94b0f1330f2.tar.xz systemd-init-02a40901a96a1a8caba8f35f6b59a94b0f1330f2.zip | |
Improve error messages.
Diffstat (limited to 'builder')
| -rwxr-xr-x | builder/dnbd3-rootfs/hooks/copy-dracut-systemd-files-into-newroot.sh | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/builder/dnbd3-rootfs/hooks/copy-dracut-systemd-files-into-newroot.sh b/builder/dnbd3-rootfs/hooks/copy-dracut-systemd-files-into-newroot.sh index 16d85835..f0e54d4c 100755 --- a/builder/dnbd3-rootfs/hooks/copy-dracut-systemd-files-into-newroot.sh +++ b/builder/dnbd3-rootfs/hooks/copy-dracut-systemd-files-into-newroot.sh @@ -42,9 +42,11 @@ for file in \ do cp "${systemd_system_unit_path}/${file}" \ "${new_systemd_system_unit_path}/${file}" - # ln returns an error if the link already exists - ln --symbolic "../${file}" \ - "${new_systemd_system_unit_path}/initrd.target.wants/${file}" + # "ln" returns an error if the link already exists. + source_path="../${file}" + target_path="${new_systemd_system_unit_path}/initrd.target.wants/${file}" + ln --symbolic "$source_path" "$targetPath" &>/dev/null || \ + logging.warn "Failed to link \"$source_path\" to \"$target_path\"." done } exceptions.catch |
