You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
512 B
14 lines
512 B
![]()
16 years ago
|
#!/bin/sh
|
||
![]()
15 years ago
|
export PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
||
![]()
14 years ago
|
strstr() { [ "${1#*$2*}" != "$1" ]; }
|
||
|
CMDLINE=$(while read line; do echo $line;done < /proc/cmdline)
|
||
![]()
16 years ago
|
exec >/dev/console 2>&1
|
||
|
export TERM=linux
|
||
|
export PS1='initramfs-test:\w\$ '
|
||
|
stty sane
|
||
|
echo "made it to the rootfs! Powering down."
|
||
![]()
14 years ago
|
[ -e /dev/.initramfs/net.ifaces ] && echo OK $(cat /dev/.initramfs/net.ifaces) > /dev/sda
|
||
|
[ -e /run/initramfs/net.ifaces ] && echo OK $(cat /run/initramfs/net.ifaces) > /dev/sda
|
||
|
strstr "$CMDLINE" "rd.shell" && sh -i
|
||
![]()
16 years ago
|
poweroff -f
|