Browse Source

base/dracut-lib.sh: "halt" the machine in systemd mode for die()

and only go in emergency shell if "rd.debug" is specified

https://bugzilla.redhat.com/show_bug.cgi?id=1053655
master
Harald Hoyer 11 years ago
parent
commit
e2ecc2d8c6
  1. 17
      modules.d/99base/dracut-lib.sh

17
modules.d/99base/dracut-lib.sh

@ -437,8 +437,15 @@ die() { @@ -437,8 +437,15 @@ die() {
echo "warn dracut: Refusing to continue";
} >> $hookdir/emergency/01-die.sh
[ -d /run/initramfs ] || mkdir -p -- /run/initramfs

> /run/initramfs/.die
emergency_shell

getargbool 0 "rd.debug=" && emergency_shell

if [ -n "$DRACUT_SYSTEMD" ]; then
systemctl --no-block --force halt
fi

exit 1
}

@ -1052,7 +1059,13 @@ emergency_shell() @@ -1052,7 +1059,13 @@ emergency_shell()
# cause a kernel panic
exit 1
fi
[ -e /run/initramfs/.die ] && exit 1

if [ -e /run/initramfs/.die ]; then
if [ -n "$DRACUT_SYSTEMD" ]; then
systemctl --no-block --force halt
fi
exit 1
fi
}

action_on_fail()

Loading…
Cancel
Save