diff options
author | Jonathan Bauer | 2020-05-13 14:26:52 +0200 |
---|---|---|
committer | Jonathan Bauer | 2020-05-13 14:26:52 +0200 |
commit | 02defd436059e43a9c11df8361f4f14fc22d7707 (patch) | |
tree | 0f71da11d35103b4896fe7e6dc33ac5dea8cbaea /build-initramfs.sh | |
parent | build-initramfs.sh: formatting + minor changes (diff) | |
download | systemd-init-02defd436059e43a9c11df8361f4f14fc22d7707.tar.gz systemd-init-02defd436059e43a9c11df8361f4f14fc22d7707.tar.xz systemd-init-02defd436059e43a9c11df8361f4f14fc22d7707.zip |
build-initramfs.sh: handle failure to copy dracut modules
Diffstat (limited to 'build-initramfs.sh')
-rwxr-xr-x | build-initramfs.sh | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/build-initramfs.sh b/build-initramfs.sh index f910e579..40b6e889 100755 --- a/build-initramfs.sh +++ b/build-initramfs.sh @@ -362,11 +362,13 @@ main() { if ! ln --symbolic --force \ "$_dracut_module_dir" "$_dracut_module_target"; then echo \ - "Linking \"$_dracut_module_dir\" to \"$_dracut_module_target\" failed." \ - "We will copy them. So we have to recopy it every time to ensure that recompiled things take effect." - cp --recursive --force --no-target-directory \ - "$_dracut_module_dir" \ - "$_dracut_module_target" + "Failed to link: '$_dracut_module_dir' -> '$_dracut_module_target'." \ + "Trying to copy them directly." + if ! cp --recursive --force --no-target-directory \ + "$_dracut_module_dir" "$_dracut_module_target"; then + echo "Failed to copy them either, exiting." + exit 1 + fi fi fi done |