network: don't use "ifup -m"
[dracut.git] / modules.d / 98dracut-systemd / dracut-emergency.sh
blob26be29191d638aa1cbcaa895ebc1e9e1893917cd
1 #!/bin/sh
3 export DRACUT_SYSTEMD=1
4 if [ -f /dracut-state.sh ]; then
5 . /dracut-state.sh 2>/dev/null
6 fi
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"
15 source_hook "$hook"
18 if getargbool 1 rd.shell -d -y rdshell || getarg rd.break -d rdbreak; then
19 echo
20 rdsosreport
21 echo
22 echo
23 echo 'Entering emergency mode. Exit the shell to continue.'
24 echo 'Type "journalctl" to view system logs.'
25 echo 'You might want to save "/run/initramfs/rdsosreport.txt" to a USB stick or /boot'
26 echo 'after mounting them and attach it to a bug report.'
27 echo
28 echo
29 [ -f /etc/profile ] && . /etc/profile
30 [ -z "$PS1" ] && export PS1="$_name:\${PWD}# "
31 exec sh -i -l
32 else
33 warn "$action has failed. To debug this issue add \"rd.shell rd.debug\" to the kernel command line."
34 exit 1
37 /bin/rm -f -- /.console_lock
39 exit 0