51-dracut-rescue-postinst.sh: add extra checks

master
Harald Hoyer 2013-03-19 16:56:56 +01:00
parent 57aa1e9140
commit 619c1bb334
1 changed files with 3 additions and 0 deletions

View File

@ -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