From 3a4fe66ffc3b19ef9b5f4bb6c80ba2c2219be866 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Sun, 17 Jan 2016 09:45:31 -0500 Subject: cmd/mkinitramfs: Use non-exiting error() and clean up on error --- (limited to 'src') diff --git a/src/cmd/mkinitramfs.sh b/src/cmd/mkinitramfs.sh index 0ff0923..df756ca 100644 --- a/src/cmd/mkinitramfs.sh +++ b/src/cmd/mkinitramfs.sh @@ -62,8 +62,9 @@ cmd_mkinitramfs_main() plat="$(cat "${root}/etc/proteanos_plat")" if ! img="$(profile_find_kernel "${root}" "${arch}" "${plat}")"; then + error "$(get_msg 'cmd_mkinitramfs_kernel_not_found')" [ "x${dev}" != 'x' ] && block_umount "${root}" - error 2 "$(get_msg 'cmd_mkinitramfs_kernel_not_found')" + return 2 fi cp -p "${root}/${img}" "${linux_output}" -- cgit v0.9.1