Changeset 478
- Timestamp:
- 05/01/08 14:04:41 (4 months ago)
- Files:
-
- trunk/etc/init.d/S99rebootcheck (modified) (1 diff)
- trunk/www/cgi-bin/webif/diag.sh (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/etc/init.d/S99rebootcheck
r437 r478 26 26 echo "`uptime | awk -F" " '{print $1}'`: entering $0" >>/tmp/.startup_log 27 27 28 if [ -f /etc/config/startup-commands ]; then 29 echo "`uptime | awk -F" " '{print $1}'`: Executing self specified commands for startup now:" >>/tmp/.startup_log 30 echo "`cat /etc/config/startup-commands | grep -v "!/bin/sh"`" >>/tmp/.startup_log 31 /etc/config/startup-commands 32 fi 33 28 34 ( 29 while [ -z "$(/usr/bin/wget "http://updates.fon.com/firmware/conncheck/conncheck.txt" -O-)" ]; do 35 echo "`uptime | awk -F" " '{print $1}'`: waiting for internet connection..." >>/tmp/.startup_log 36 while [ -z "$(/usr/bin/wget "http://updates.fon.com/firmware/conncheck/conncheck.txt" -O-)" ]; do 30 37 sleep 5 31 38 done 39 echo "`uptime | awk -F" " '{print $1}'`: internet connection detected" >>/tmp/.startup_log 32 40 33 ntpclient -s -h pool.ntp.org 41 ntpclient -s -h pool.ntp.org && echo "`uptime | awk -F" " '{print $1}'`: time sync completed" >>/tmp/.startup_log 34 42 35 43 . /etc/functions.sh trunk/www/cgi-bin/webif/diag.sh
r457 r478 93 93 echo "<input type=\"hidden\" name=\"pin\" value=\"$pin\" />" 94 94 95 display_form <<EOF 96 infotable|Enter commands to be executed at startup here 97 EOF 98 99 echo "<textarea name="commandlist" style='width:700px; height:400px'>" 100 if empty "$FORM_submit"; then 101 [ -f /etc/config/startup-commands ] && echo "`cat /etc/config/startup-commands | grep -v "!/bin/sh"`" 102 else 103 if [ "$do_not_execute" = "0" ]; then 104 if empty $FORM_commandlist; then 105 rm -f /etc/config/startup-commands 106 else 107 echo "#!/bin/sh" >/etc/config/startup-commands 108 echo "$FORM_commandlist" >>/etc/config/startup-commands 109 chmod 0755 /etc/config/startup-commands >/dev/null 2>&1 110 [ -f /etc/config/startup-commands ] && echo "`cat /etc/config/startup-commands | grep -v "!/bin/sh"`" 111 fi 112 else 113 echo "Form seems to be corrupted, no changes were saved for security reasons." 114 fi 115 fi 116 echo "</textarea>" 117 118 display_form <<EOF 119 start_table|0|10|5 120 add_row 121 add_button_cell|submit|@TR<<Submit>> 122 end_row 123 end_table 124 EOF 125 95 126 footer ?>
