]>
git.ipfire.org Git - thirdparty/dracut.git/blob - modules.d/98dracut-systemd/dracut-emergency.sh
1a11220b8c08d970a8357adf8af2346451d3926e
3 export DRACUT_SYSTEMD
=1
4 if [ -f /dracut-state.sh
]; then
5 .
/dracut-state.sh
2>/dev
/null
7 type getarg
>/dev
/null
2>&1 || .
/lib
/dracut-lib.sh
9 source_conf
/etc
/conf.d
11 type plymouth
>/dev
/null
2>&1 && plymouth quit
13 export _rdshell_name
="dracut" action
="Boot" hook
="emergency"
14 _emergency_action
=$
(getarg rd.emergency
)
16 if getargbool
1 rd.shell
-d -y rdshell || getarg rd.
break -d rdbreak
; then
17 FSTXT
="/run/dracut/fsck/fsck_help_$fstype.txt"
18 RDSOSREPORT
="$(rdsosreport)"
20 while read _tty rest
; do
26 echo 'Entering emergency mode. Exit the shell to continue.'
27 echo 'Type "journalctl" to view system logs.'
28 echo 'You might want to save "/run/initramfs/rdsosreport.txt" to a USB stick or /boot'
29 echo 'after mounting them and attach it to a bug report.'
32 [ -f "$FSTXT" ] && cat "$FSTXT"
35 [ -f /etc
/profile
] && .
/etc
/profile
36 [ -z "$PS1" ] && export PS1
="$_name:\${PWD}# "
39 export hook
="shutdown-emergency"
40 warn
"$action has failed. To debug this issue add \"rd.shell rd.debug\" to the kernel command line."
42 [ -z "$_emergency_action" ] && _emergency_action
=halt
45 /bin
/rm -f -- /.console_lock
47 case "$_emergency_action" in