tazpanel rev 124
network.cgi/eth: activate dhcp or static
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Apr 15 15:12:44 2011 +0200 (2011-04-15) |
parents | b496f4d00880 |
children | 1d03158c5c3e |
files | boot.cgi network.cgi |
line diff
1.1 --- a/boot.cgi Fri Apr 15 13:20:13 2011 +0200 1.2 +++ b/boot.cgi Fri Apr 15 15:12:44 2011 +0200 1.3 @@ -144,7 +144,8 @@ 1.4 </p> 1.5 </div> 1.6 <div> 1.7 - <a class="button" href="$SCRIPT_NAME?daemons">Manage daemons</a> 1.8 + <a class="button" href="$SCRIPT_NAME?daemons"> 1.9 + <img src="$IMAGES/recharge.png" />`gettext "Manage daemons"`</a> 1.10 </div> 1.11 1.12 <h3>`gettext "Configuration files"`</h3>
2.1 --- a/network.cgi Fri Apr 15 13:20:13 2011 +0200 2.2 +++ b/network.cgi Fri Apr 15 15:12:44 2011 +0200 2.3 @@ -95,13 +95,16 @@ 2.4 # Wired connections settings 2.5 xhtml_header 2.6 if [ "$(GET ip)" ]; then 2.7 - LOADING_MSG=$(gettext "Setting up static IP...") 2.8 + DHCP=no 2.9 + STATIC=no 2.10 + [ -n "$(GET dhcp)" ] && DHCP=yes 2.11 + [ -n "$(GET static)" ] && STATIC=yes 2.12 + LOADING_MSG=$(gettext "Setting up IP...") 2.13 loading_msg 2.14 sed -i \ 2.15 -e s"/^INTERFACE=.*/INTERFACE=\"$(GET iface)\""/ \ 2.16 - -e s'/^DHCP=.*/DHCP="no"/' \ 2.17 - -e s'/^WIFI=.*/WIFI="no"/' \ 2.18 - -e s'/^STATIC=.*/STATIC="yes"/' \ 2.19 + -e s"/^DHCP=.*/DHCP=\"$DHCP\"/" \ 2.20 + -e s"/^STATIC=.*/STATIC=\"$STATIC\"/" \ 2.21 -e s"/^NETMASK=.*/NETMASK=\"$(GET netmask)\"/" \ 2.22 -e s"/^GATEWAY=.*/GATEWAY=\"$(GET gateway)\"/" \ 2.23 -e s"/^DNS_SERVER=.*/DNS_SERVER=\"$(GET dns)\"/" \ 2.24 @@ -145,7 +148,9 @@ 2.25 <td><input type="text" name="dns" size="20" value="$DNS_SERVER" /></td> 2.26 </tr> 2.27 $(table_end) 2.28 - <input type="submit" value="`gettext "Activate"`"> 2.29 + <input type="submit" name="static" value="`gettext "Activate (static)"`"> 2.30 + <input type="submit" name="dhcp" value="`gettext "Activate (DHCP)"`"> 2.31 + <input type="submit" name="disable" value="`gettext "Disable"`"> 2.32 </form> 2.33 2.34 <h3>$(gettext "Configuration file")</h3>