Magellan Linux

Diff of /trunk/magellan-initscripts/etc/rc.d/init.d/network

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 691 by niro, Sat Mar 22 17:54:46 2008 UTC revision 867 by niro, Sat May 9 16:08:38 2009 UTC
# Line 1  Line 1 
1  #!/bin/bash  #!/bin/bash
2  # $Header: /home/cvsd/magellan-cvs/magellan-src/magellan-initscripts/etc/rc.d/init.d/network,v 1.18 2008-03-22 17:54:46 niro Exp $  # $Header: /home/cvsd/magellan-cvs/magellan-src/magellan-initscripts/etc/rc.d/init.d/network,v 1.19 2008-12-22 22:01:15 niro Exp $
3    
4  #%rlevels: 0:k 1:k 2:k 3:s 4:s 5:s 6:k  #%rlevels: 0:k 1:k 2:k 3:s 4:s 5:s 6:k
5  #%start: 20  #%start: 20
# Line 10  Line 10 
10  #%before:  #%before:
11  #%after:  #%after:
12    
13  source /etc/sysconfig/rc  source /etc/conf.d/rc
14  source ${rc_functions}  source ${rc_functions}
15    
16  # read values from files  # read values from files
# Line 195  config_wireless_wpa() Line 195  config_wireless_wpa()
195   # write default cfg from skeleton   # write default cfg from skeleton
196   cat ${WIRELESS_WPA_SKEL} > ${WIRELESS_WPA_CONFIG}   cat ${WIRELESS_WPA_SKEL} > ${WIRELESS_WPA_CONFIG}
197    
198     local wpa_proto
199     case ${WIRELESS_AUTH_MODE} in
200     wpa) wpa_proto="WPA" ;;
201     wpa2) wpa_proto="WPA2" ;;
202     esac
203    
204   # setup the network entry   # setup the network entry
205   sed -i -e "s:@WIRELESS_ESSID@:${WIRELESS_ESSID}:g" \   sed -i -e "s:@WIRELESS_ESSID@:${WIRELESS_ESSID}:g" \
206   -e "s:@WIRELESS_KEY@:${WIRELESS_KEY}:g" \   -e "s:@WIRELESS_KEY@:${WIRELESS_KEY_ASCII}:g" \
207     -e "s:@WIRELESS_AUTH_MODE@:${wpa_proto}:g" \
208   ${WIRELESS_WPA_CONFIG}   ${WIRELESS_WPA_CONFIG}
209   fi   fi
210    
# Line 245  setup_wireless_extensions() Line 252  setup_wireless_extensions()
252   [[ -n ${WIRELESS_NICK} ]] && iwconfig "${iface}" nick "${WIRELESS_NICK}"   [[ -n ${WIRELESS_NICK} ]] && iwconfig "${iface}" nick "${WIRELESS_NICK}"
253    
254   case "${WIRELESS_AUTH_MODE}" in   case "${WIRELESS_AUTH_MODE}" in
255   wpa) config_wireless_wpa "${iface}" ;;   wpa|wpa2) config_wireless_wpa "${iface}" ;;
256   wep|on) config_wireless_wep "${iface}" ;;   wep|on) config_wireless_wep "${iface}" ;;
257   off) iwconfig "${iface}" enc off ;;   off) iwconfig "${iface}" enc off ;;
258   esac   esac
259  }  }
260    

Legend:
Removed from v.691  
changed lines
  Added in v.867