From: Harald Hoyer Date: Tue, 19 Mar 2013 15:56:56 +0000 (+0100) Subject: 51-dracut-rescue-postinst.sh: add extra checks X-Git-Tag: 027~17 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=619c1bb334ea28fb2f096640d6127b6bfb2a0c8b;p=thirdparty%2Fdracut.git 51-dracut-rescue-postinst.sh: add extra checks --- diff --git a/51-dracut-rescue-postinst.sh b/51-dracut-rescue-postinst.sh index 21208a441..d20649662 100755 --- a/51-dracut-rescue-postinst.sh +++ b/51-dracut-rescue-postinst.sh @@ -10,6 +10,9 @@ KERNEL_IMAGE="$2" [[ -f /etc/os-release ]] && . /etc/os-release [[ -f /etc/machine-id ]] && read MACHINE_ID < /etc/machine-id +[[ $MACHINE_ID ]] || exit 1 +[[ -f $KERNEL_IMAGE ]] || exit 1 + INITRDFILE="/boot/initramfs-${MACHINE_ID}-rescue.img" [[ -f $INITRDFILE ]] && exit 0