]>
Commit | Line | Data |
---|---|---|
c0b5f979 | 1 | #!/bin/sh |
387bf82e | 2 | export PATH=/sbin:/bin:/usr/sbin:/usr/bin |
2c19a5fa | 3 | strstr() { [ "${1#*"$2"*}" != "$1" ]; } |
ceaf49d7 | 4 | CMDLINE=$(while read line; do echo $line;done < /proc/cmdline) |
96d22bd7 | 5 | command -v plymouth >/dev/null && plymouth --quit |
c0b5f979 | 6 | exec >/dev/console 2>&1 |
1a0c05b8 | 7 | echo "dracut-root-block-success" >/dev/sda1 |
c0b5f979 | 8 | export TERM=linux |
92391334 | 9 | export PS1='initramfs-test:\w\$ ' |
ceaf49d7 HH |
10 | [ -f /etc/mtab ] || ln -sfn /proc/mounts /etc/mtab |
11 | [ -f /etc/fstab ] || ln -sfn /proc/mounts /etc/fstab | |
c0b5f979 | 12 | stty sane |
ceaf49d7 HH |
13 | echo "made it to the rootfs!" |
14 | strstr "$CMDLINE" "rd.shell" && sh -i | |
15 | echo "Powering down." | |
6ce31231 | 16 | mount -n -o remount,ro / |
8570b544 | 17 | #echo " rd.break=shutdown " >> /run/initramfs/etc/cmdline |
96d22bd7 HH |
18 | if [ -d /run/initramfs/etc ]; then |
19 | echo " rd.debug=0 " >> /run/initramfs/etc/cmdline | |
20 | fi | |
ceaf49d7 | 21 | if [ -e /lib/systemd/systemd-shutdown ]; then |
96d22bd7 | 22 | exec /lib/systemd/systemd-shutdown poweroff |
ceaf49d7 | 23 | fi |
4b8b7c59 | 24 | poweroff -f |