slitaz-tools diff tinyutils/netbox @ rev 216

netbox: add wpa support
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Jun 23 16:54:39 2008 +0000 (2008-06-23)
parents bfbb1b457dc4
children 40e8869e8ea6
line diff
     1.1 --- a/tinyutils/netbox	Mon Jun 23 15:16:13 2008 +0000
     1.2 +++ b/tinyutils/netbox	Mon Jun 23 16:54:39 2008 +0000
     1.3 @@ -96,8 +96,18 @@
     1.4  or static IP, and setup servers. Netbox can start or stop networking,
     1.5  configure network interfaces or directly edit files."
     1.6        </label>
     1.7 -      </text>
     1.8 -    </frame>
     1.9 +    </text>
    1.10 +  </frame>
    1.11 +  <frame Francais>
    1.12 +    <text wrap="true" width-chars="58">
    1.13 +      <label>
    1.14 +"Netbox vous permet de gerer les connexions reseau avec une IP
    1.15 +statique ou en obtenant une IP dynamique par DHCP, et de parametrer
    1.16 +les serveurs. Netbox peut demarrer ou arreter le reseau, configurer
    1.17 +les interfaces reseau ou editer directement les fichiers."
    1.18 +      </label>
    1.19 +    </text>
    1.20 +  </frame>
    1.21  </vbox>
    1.22  </window>
    1.23  '
    1.24 @@ -349,7 +359,7 @@
    1.25      </frame>'
    1.26  NET_BOX="$NET_BOX$tmp"
    1.27  tmp='<frame Wireless>
    1.28 -    <notebook labels="Interface|Extra parameters'
    1.29 +    <notebook labels="Interface|Extra parameters|WPA'
    1.30  [ -d /lib/modules/`uname -r`/kernel/drivers/net/wireless ] && tmp="$tmp|Kernel Modules"
    1.31  [ -x /usr/sbin/ndiswrapper ] && tmp="$tmp|Ndiswrapper"
    1.32  tmp2='">
    1.33 @@ -407,6 +417,72 @@
    1.34  tmp="$tmp$tmp2$tmp3"
    1.35  tmp2='<vbox>
    1.36        <hbox>
    1.37 +        <text use-markup="true">
    1.38 +          <label>"<b>WPA_OPTIONS</b>"</label>
    1.39 +        </text>
    1.40 +        <entry editable="false">'
    1.41 +[ -n "$WPA_OPTIONS" ] && tmp2="$tmp2<default>$WPA_OPTIONS</default>"
    1.42 +tmp3='
    1.43 +          <variable>WPA_OPTS</variable>
    1.44 +        </entry>
    1.45 +        <button>
    1.46 +          <input file icon="help"></input>
    1.47 +	  <action>xterm -fa MiscFixed -fs 11 -bg gray93 -fg black -geometry 80x30 -title "wpa_supplicant help (q to quit)" -e "wpa_supplicant --help | less"</action>
    1.48 +        </button>
    1.49 +        <button>
    1.50 +          <input file icon="accessories-text-editor"></input>
    1.51 +          <action type="lauch">leafpad /etc/daemons.conf</action>
    1.52 +        </button>
    1.53 +      </hbox>
    1.54 +      <hbox>
    1.55 +        <text use-markup="true">
    1.56 +          <label>"<b>Configuration:</b>"</label>
    1.57 +        </text>
    1.58 +        <entry editable="false">
    1.59 +          <default>/etc/wpa_supplicant.conf</default>
    1.60 +          <variable>WPA_CONF</variable>
    1.61 +        </entry>
    1.62 +        <button>
    1.63 +          <input file icon="accessories-text-editor"></input>
    1.64 +          <action type="lauch">leafpad $WPA_CONF</action>
    1.65 +        </button>
    1.66 +      </hbox>
    1.67 +      <hbox>
    1.68 +        <button>
    1.69 +          <label>Start WPA</label>
    1.70 +          <input file icon="forward"></input>
    1.71 +          <action>sed -i "s/RUN_DAEMONS=\"\(.*\)wpa_supplicant \?\(.*\)\"/RUN_DAEMONS=\"\1\2\"/" /etc/rcS.conf</action>
    1.72 +          <action>sed -i "s/RUN_DAEMONS=\"\(.*\)\"/RUN_DAEMONS=\"wpa_supplicant \1\"/" /etc/rcS.conf</action>
    1.73 +          <action>/etc/init.d/wpa_supplicant start</action>
    1.74 +        </button>
    1.75 +        <button>
    1.76 +          <label>Stop WPA</label>
    1.77 +          <input file icon="stop"></input>
    1.78 +          <action>sed -i "s/RUN_DAEMONS=\"\(.*\)wpa_supplicant \?\(.*\)\"/RUN_DAEMONS=\"\1\2\"/" /etc/rcS.conf</action>
    1.79 +          <action>/etc/init.d/wpa_supplicant stop</action>
    1.80 +        </button>
    1.81 +      </hbox>
    1.82 +      </vbox>'
    1.83 +[ -x /usr/bin/wpa_supplicant ] && tmp="$tmp$tmp2$tmp3"
    1.84 +tmp2='<vbox>
    1.85 +      <hbox>
    1.86 +      <text wrap="true" width-chars="64" use-markup="true">
    1.87 +        <label>
    1.88 +"<i>The package <b>wpa_supplicant</b> is not yet installed</i>"
    1.89 +        </label>
    1.90 +      </text>
    1.91 +      <button>
    1.92 +        <input file icon="go-jump"></input>
    1.93 +	<label>Install</label>
    1.94 +        <action>[ -f /var/lib/tazpkg/packages.list ] || tazpkg recharge</action>
    1.95 +	<action>xterm -fa MiscFixed -fs 11 -bg gray93 -fg black -geometry 80x17 -title "wpa_supplicant install" -e "tazpkg get-install wpa_supplicant ; echo -e "----\n\nENTER to continue..." && read close"</action>
    1.96 +        <action type="exit">Exit</action>
    1.97 +      </button>
    1.98 +      </hbox>
    1.99 +      </vbox>'
   1.100 +[ -x /usr/bin/wpa_supplicant ] || tmp="$tmp$tmp2"
   1.101 +tmp2='<vbox>
   1.102 +      <hbox>
   1.103          <button>
   1.104            <label>Load</label>
   1.105            <input file icon="forward"></input>