linuxrc文件,rc.local文件,rcS文件,我的根文件系统启动脚本文件

我的根文件系统启动脚本文件,在此列出,以备查询。

[root@zmf26 rootfs]# cat etc/init.d/linuxrc
#!/bin/ash
echo "------next to run /linuxrc"
/bin/mount -f -t cramfs -o remount,ro /dev/mtdblock/3 /
/bin/mount -t tmpfs tmpfs /dev/shm
/bin/mount -f -t sysfs sysfs /sys
/bin/mount -t tmpfs tmpfs /mnt
/bin/mkdir -m 775 /mnt/usb
/bin/mount -t proc none /proc
/bin/mount -t devpts devpts /dev/pts

# mount devpts in order to use telnetd
#/bin/echo /sbin/mdev > /proc/sys/kernel/hotplug
/sbin/mdev -s

echo "------next to mount /tmp,/tmp/app,cp /etc/tmp/boa /tmp/app"
/bin/mount -t tmpfs none /root
/bin/cp /etc/udev/usbmount.sh /root/

/bin/mount -t tmpfs none /var
/bin/mkdir -p /var/lib
/bin/mkdir -p /var/run
/bin/mkdir -p /var/log/boa
#/bin/cp -rf /etc/tmp/www /var/

/bin/mount -t ramfs ramfs /tmp
/bin/mkdir /tmp/app
/bin/mount -f -t ramfs ramfs /tmp/app
/bin/cp -rf /etc/tmp/* /tmp/app/

echo "------next to mount yaffs2 /user,/data"
/bin/mount -t yaffs2 /dev/mtdblock/4 /user
/bin/mount -t yaffs2 /dev/mtdblock/5 /data

exec /etc/init.d/rc.local

echo "------next to run /sbin/init"
exec /sbin/init
[root@zmf26 rootfs]# cat etc/init.d/rc.local
#!/bin/ash
echo "------next to run /usr/etc/rc.local "
WEBPATH=/tmp/app
MODDIR=/lib/modules/2.6.14.1/
/sbin/hwclock -s
/sbin/inetd
insmod $MODDIR/usbcore.ko
insmod $MODDIR/scsi_mod.ko
insmod $MODDIR/ub.ko
insmod $MODDIR/ohci-hcd.ko
insmod $MODDIR/soundcore.ko
insmod $MODDIR/uda1341_s3c2410.ko
insmod $MODDIR/led_s3c2410.ko
insmod $MODDIR/kbd_s3c2410.ko
insmod $MODDIR/beep_s3c2410.ko
#/tmp/app/ledrpm_exe &

#/sbin/ifconfig eth0 192.168.0.99
#/sbin/ifconfig eth0 down
#/sbin/ifconfig eth0 hw ether 00:00:f1:21:53:f5
#/sbin/pump -i eth0
/sbin/ifconfig eth0 192.168.0.99 netmask 255.255.255.0 up
/sbin/route add default gw 192.168.0.1
/sbin/inetd
echo "------ifconfig eth0 192.168.0.99 complete"

#cd /dev
#ln -s fb/0 fb0
#ln -s vc/0 tty0              
#ln -s vc/1 tty1              
#ln -s vc/2 tty2
#echo "------ ln -s vc/2 tty2 complete"

/sbin/inetd /etc/inetd.conf

if [ -f /tmp/app/boa/boa ];
then
/tmp/app/boa/boa -c /etc/boa/ &
echo "------run /tmp/app/boa/boa&"
else
echo "------error:/tmp/app/boa file dose'n exist!"
fi

if [ -f $WEBPATH/powercontrolboard ];
then
$WEBPATH/powercontrolboard&
echo "------run $WEBPATH/powercontrolboard&"
else
echo "------error:$WEBPATH/powercontrolboard file dose'n exist!"
fi

if [ -f $WEBPATH/boa/http/cgi-bin/smart_arm.cgi ];
then
echo "------$WEBPATH/boa/http/cgi-bin/smart_arm.cgi file exist!"
else
echo "------error:$WEBPATH/boa/http/cgi-bin/smart_arm.cgi file dose'n exist!"
fi
[root@zmf26 rootfs]# ls etc/init.d/ -l
鎬昏 12
-rwxr-xr-x 1 root root 1005 08-13 19:44 linuxrc
-rwxrwxr-x 1 root root 1431 08-23 21:18 rc.local
-rwxrwxr-x 1 root root   91 08-10 02:05 rcS
You have new mail in /var/spool/mail/root
[root@zmf26 rootfs]# cat etc/init.d/rc
rc.local  rcS      
[root@zmf26 rootfs]# cat etc/init.d/rcS
#!/bin/ash
echo "------next to run /etc/inid.d/rcS"
/bin/mount -a
exec /etc/init.d/linuxrc
[root@zmf26 rootfs]#

你可能感兴趣的:(c,File,脚本,exe)