
1 changed files with 5 additions and 2 deletions
@ -1,10 +1,13 @@ |
|||||||
#!/bin/sh |
#!/bin/sh |
||||||
export PATH=/sbin:/bin:/usr/sbin:/usr/bin |
export PATH=/sbin:/bin:/usr/sbin:/usr/bin |
||||||
|
strstr() { [ "${1#*$2*}" != "$1" ]; } |
||||||
|
CMDLINE=$(while read line; do echo $line;done < /proc/cmdline) |
||||||
exec >/dev/console 2>&1 |
exec >/dev/console 2>&1 |
||||||
export TERM=linux |
export TERM=linux |
||||||
export PS1='initramfs-test:\w\$ ' |
export PS1='initramfs-test:\w\$ ' |
||||||
stty sane |
stty sane |
||||||
echo "made it to the rootfs! Powering down." |
echo "made it to the rootfs! Powering down." |
||||||
echo OK $(cat /dev/.initramfs/net.ifaces) > /dev/sda |
[ -e /dev/.initramfs/net.ifaces ] && echo OK $(cat /dev/.initramfs/net.ifaces) > /dev/sda |
||||||
#sh -i |
[ -e /run/initramfs/net.ifaces ] && echo OK $(cat /run/initramfs/net.ifaces) > /dev/sda |
||||||
|
strstr "$CMDLINE" "rd.shell" && sh -i |
||||||
poweroff -f |
poweroff -f |
||||||
|
Loading…
Reference in new issue