中尉
- 注册时间
- 2008-12-27
- 金币
- 594 个
- 威望
- 1 个
- 荣誉
- 0 个
尚未签到
|
\rootfs\etc\init.d\rcS 文件
#--- exec script ---
if [ -f /mnt/USB/USB_C/autoexec ];then
/mnt/USB/USB_C/autoexec
fi ;
if [ -f /mnt/C/autoexec ];then
/mnt/C/autoexec
fi ;
好象有在查找autoexec文件并运行
能在C盘建个autoexec文件吗并自动运行吗?
#!/bin/ash
#
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin
echo 'set path'
#-------------------
mount -t proc none /proc
mount -t tmpfs tmpfs /tmp
echo 'mount'
#-------------------
mkdir /tmp/share
mkdir -p /tmp/mnt/USB
mkdir -p /tmp/var/lib/nfs
mkdir -p /var/config/share/empty
mkdir /var/lock
mkdir /var/run
mkdir /var/dhcpc
mkdir /var/config/mini-lpd
mkdir /var/config/samba
mkdir /var/log
chmod 777 /var/log
ln -s /mnt /var/mnt
ln -s /proc/net/wireless_syslog /var/log/wireless.log
hotplug boot &
echo 'make dir'
#-------------------
led &
amit_reset
touch /var/run/dhcp_mode
touch /var/config/dhcpd.leases
touch /var/lib/nfs/xtab
echo "/mnt/C *(rw,no_root_squash,insecure,async)" > /var/config/exports
echo 'init config'
#-------------------
echo "1"> /var/cold_start
echo 'write coldstart flag'
#-------------------
sleep 5
ed 1
echo 'execute ed 1'
#-------------------
route add -net 224.0.0.0 netmask 240.0.0.0 dev br0
echo 'add multicast routing'
#--- exec script ---
if [ -f /mnt/USB/USB_C/autoexec ];then
/mnt/USB/USB_C/autoexec
fi ;
if [ -f /mnt/C/autoexec ];then
/mnt/C/autoexec
fi ;
#------ services --------
telnetd &
insmod fuse
/etc/init.d/rc.nfsd start
#-------------------
exit |
|