3 if [ -f /fs/config/system ]
10 mkdir /var/www/data/stats
11 chmod 777 /var/www/data/stats
12 mkdir /var/www/data/logs
13 chmod 777 /var/www/data/logs
15 if [ ! -f /fs/config/dropbear.tar ]
19 tar cf /fs/config/dropbear.tar /etc/dropbear
23 if [ -f /fs/config/ntp.conf ]
25 setserial /dev/ttyS0 low_latency
26 ntpd -c /fs/config/ntp.conf -x -g -N
29 if [ -d /var/www/data ]
31 /opt/reboot_daemon.sh > /var/www/data/logs/reboot_daemon 2>&1 &
32 /opt/restart_ssh_daemon.sh > /var/www/data/logs/restart_ssh_daemon 2>&1 &
33 /opt/stats_daemon.sh > /var/www/data/logs/stats_daemon 2>&1 &
37 if [ -f /fs/config/inetd.conf ]
39 /usr/sbin/inetd /fs/config/inetd.conf
41 # this is a little silly, i should really be a little more useful with this
42 cat > /fs/config/inetd.conf << EOF
43 20010 stream tcp nowait root reboot
44 20011 stream tcp nowait root sh
45 20012 stream tcp nowait root ntpq ntpq -c lpe -n
46 20013 stream tcp nowait root ps ps -ef
47 20014 stream tcp nowait root free
49 /usr/sbin/inetd /fs/config/inetd.conf
53 # work around problems with thttpd startup and its stupid stats output (which spams syslog when the time jumps too much)
54 killall -9 thttpd_wrapper
57 # work around dhcpd not doing the right thing