📄 linuxrc
字号:
#!/bin/sh# $Id: linuxrc,v 1.1 2002/11/06 06:30:10 ken_yap Exp $PATH=/sbin:/binecho Busybox /linuxrc startingecho Mounting /proc filesystemmount -t proc none /procecho=echoif grep '\bquiet\b' /proc/cmdline > /dev/null; then echo=true quiet=1fi$echo Creating root devicemknod /dev/root b 1 0 2>/dev/nullchmod 700 /dev/rootecho 0x100 > /proc/sys/kernel/real-root-dev$echo Inserting modulesif [ -z "$quiet" ]; then /bin/insert-moduleselse /bin/insert-modules >/dev/nullfi$echo Bringing up loopback interfaceifconfig lo 127.0.0.1 uproute add -net 127.0.0.0 netmask 255.0.0.0 lo# Hack required for prism2 cards# It is not yet possible to use iwconfig to configure these cards,# so we need wlanctl.if ifconfig wlan0 down 2> /dev/null; then $echo Setting up wireless link wlanctl wlan0 lnxreq_ifstate ifstate=enable wlanctl wlan0 lnxreq_autojoin ssid= authtype=opensystemfi$echo Obtaining IP address via DHCP$echo Trying to obtain IP address via wired link [eth0]if udhcpc -i eth0 -f -n -q -s /bin/udhcpc-post; then $echo Successfully obtained IP address via wired link [eth0]else $echo Failed to obtain IP address via wired link [eth0] $echo Trying to obtain IP address via wireless link [wlan0] udhcpc -i wlan0 -f -n -q -s /bin/udhcpc-postfiif [ -d /sysroot/initrd ]; then $echo Unmounting /proc prior to pivot_root umount /proc $echo Pivoting root to /sysroot pivot_root /sysroot /sysroot/initrd cd / $echo Remounting devfs at correct place mount -t devfs none /dev $echo Releasing locks on old devfs exec 0</dev/null exec 1>/dev/console exec 2>/dev/console $echo Unmounting old devfs umount /initrd/develse # Failed to mount root: report error and hang echo FATAL ERROR: Failed to mount root filesystem echo Press Alt-SysRq-B or hit the reset switch to reboot while : ; do sleep 6000 ; donefi
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -