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=1053655master
parent
b40e38db98
commit
e2ecc2d8c6
|
@ -437,8 +437,15 @@ die() {
|
||||||
echo "warn dracut: Refusing to continue";
|
echo "warn dracut: Refusing to continue";
|
||||||
} >> $hookdir/emergency/01-die.sh
|
} >> $hookdir/emergency/01-die.sh
|
||||||
[ -d /run/initramfs ] || mkdir -p -- /run/initramfs
|
[ -d /run/initramfs ] || mkdir -p -- /run/initramfs
|
||||||
|
|
||||||
> /run/initramfs/.die
|
> /run/initramfs/.die
|
||||||
emergency_shell
|
|
||||||
|
getargbool 0 "rd.debug=" && emergency_shell
|
||||||
|
|
||||||
|
if [ -n "$DRACUT_SYSTEMD" ]; then
|
||||||
|
systemctl --no-block --force halt
|
||||||
|
fi
|
||||||
|
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1052,7 +1059,13 @@ emergency_shell()
|
||||||
# cause a kernel panic
|
# cause a kernel panic
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
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()
|
action_on_fail()
|
||||||
|
|
Loading…
Reference in New Issue