setup
setup is a system configuration tool used by the stock MG-35 firmware.
Version: 2.0
Status: Done
Description
Standard setup script:
killall udhcpc
/sbin/ifconfig eth0 down
if [ $DHCP_ENABLED ]
then
$DHCP_IP = $DHCP_NETMASK = 0;
udhcpc eth0 &
else
/sbin/ifconfig eth0 $STATIC_IP up
echo "interfaces = $STATIC_IP/$NETMASK_LEN" > /hosts/smb.conf
echo "socket options = TCP_NODELAY SO_KEEPALIVE SO_RCVBUF=32768 SO_SNDBUF=128" >> /hosts/smb.conf
fi
Setup can be run multiple times. It takes a few seconds, but this is no big deal. Note that in the case of leaving off the 'r' option, this causes all of the mounts to be double (or triple, etc) mounted.
Usage
/bin/setup [{f...|F...} | {r...|R...}]
Options:
f | F run poweroff script before standard setup:
echo "setup: poweroff"
/sbin/ifconfig eth0 down
/sbin/rmmod hc_isp116x # USB host controller
/sbin/rmmod dm9000x_32 # Ethernet connector
r | R don't run poweron script before standard setup:
mount -t proc proc /proc -o nosuid
mount -t ramfs ramfs /hosts -o nosuid
mount -t ramfs ramfs /net -o nosuid
mount -t ramfs ramfs /usb -o nosuid
License
Version 2: GPL v2
Version 1: Proprietary
Todo
History
Version 2.0 - [John, 8 July 2008]
- Rewritten
- Added exit after running poweroff script
- Shrunk binary from 38kB to 12kB
Version 1.0 - [AL Tech, 2005]
Comments
VasileB: the original setup program is called by dvdplayer.bin in 3 ways:
/bin/setup restart
/bin/setup
/bin/setup f
Comments (0)
You don't have permission to comment on this page.