Magellan Linux

Diff of /trunk/initscripts/sysvinit/rc/network

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

revision 1356 by niro, Sat Jun 4 21:05:01 2011 UTC revision 2063 by niro, Thu Feb 21 08:27:48 2013 UTC
# Line 12  Line 12 
12    
13  source /etc/conf.d/rc  source /etc/conf.d/rc
14  source ${rc_functions}  source ${rc_functions}
15    source /etc/conf.d/network
16    
17  # read values from files  # read values from files
18  read_value()  read_value()
# Line 96  checkconfig() Line 97  checkconfig()
97   if [[ -z ${NETMASK} ]]   if [[ -z ${NETMASK} ]]
98   then   then
99   rc_echo -n "NETMASK missing in net.${iface}, "   rc_echo -n "NETMASK missing in net.${iface}, "
100   rc_echo "using 255.255.255.0"   rc_echo "using ${DEFAULT_NETMASK}"
101   NETMASK=255.255.255.0   NETMASK="${DEFAULT_NETMASK}"
102   fi   fi
103    
104   if [[ -z ${BROADCAST} ]]   if [[ -z ${BROADCAST} ]]
# Line 111  checkconfig() Line 112  checkconfig()
112   if [[ -z ${DHCP_PROG} ]]   if [[ -z ${DHCP_PROG} ]]
113   then   then
114   rc_echo -n "DHCP_PROG missing in net.${iface},"   rc_echo -n "DHCP_PROG missing in net.${iface},"
115   rc_echo "using default programm /sbin/dhcpcd"   rc_echo "using default programm ${DEFAULT_DHCP_PROG}"
116   DHCP_PROG="/sbin/dhcpcd"   DHCP_PROG="${DEFAULT_DHCP_PROG}"
117   fi   fi
118   [[ -z ${DHCP_START} ]] && DHCP_START="-t 10"   [[ -z ${DHCP_START} ]] && DHCP_START="${DEFAULT_DHCP_START}"
119   [[ -z ${DHCP_STOP} ]] && DHCP_STOP="-k"   [[ -z ${DHCP_STOP} ]] && DHCP_STOP="${DEFAULT_DHCP_STOP}"
120   ;;   ;;
121    
122   esac   esac
# Line 179  config_wireless_wpa() Line 180  config_wireless_wpa()
180   return 1   return 1
181   fi   fi
182    
183   if [ ! -x /sbin/wpa_supplicant ]   if [ ! -x $(type -P wpa_supplicant) ]
184   then   then
185   rc_echo "WPA: wpa_supplicant not installed. Aborting setup."   rc_echo "WPA: wpa_supplicant not installed. Aborting setup."
186   return 1   return 1
# Line 193  config_wireless_wpa() Line 194  config_wireless_wpa()
194   [[ -f /etc/conf.d/wpa_supplicant ]] && source /etc/conf.d/wpa_supplicant   [[ -f /etc/conf.d/wpa_supplicant ]] && source /etc/conf.d/wpa_supplicant
195    
196   # check the configuration   # check the configuration
197   [[ -z ${WIRELESS_WPA_CONFIG} ]] && WIRELESS_WPA_CONFIG=/etc/wpa_supplicant.auto   [[ -z ${WIRELESS_WPA_CONFIG} ]] && WIRELESS_WPA_CONFIG=/etc/wpa_supplicant/wpa_supplicant.auto
198   [[ -z ${WIRELESS_WPA_SKEL} ]] && WIRELESS_WPA_SKEL=/etc/conf.d/wpa_supplicant.skel   [[ -z ${WIRELESS_WPA_SKEL} ]] && WIRELESS_WPA_SKEL=/etc/conf.d/wpa_supplicant.skel
199    
200   # use wext as default driver, do not abort here anymore   # use wext as default driver, do not abort here anymore
# Line 220  config_wireless_wpa() Line 221  config_wireless_wpa()
221   fi   fi
222    
223   # remove old state dir   # remove old state dir
224   [ -d /var/run/wpa_supplicant ] && rm -rf /var/run/wpa_supplicant   [ -d /run/wpa_supplicant ] && rm -rf /run/wpa_supplicant
225    
226   # now run the wpa_supplicant dameon   # now run the wpa_supplicant dameon
227   wpa_supplicant -B \   wpa_supplicant -B \
# Line 355  config_bridge_devices() Line 356  config_bridge_devices()
356   fi   fi
357    
358   # first check for brctl   # first check for brctl
359   if [[ -z $(which brctl) ]]   if [[ -z $(type -P brctl) ]]
360   then   then
361   rc_echo "brctl not found! Please install 'net-misc/bridge-utils'."   rc_echo "brctl not found! Please install 'net-misc/bridge-utils'."
362   return 1   return 1
# Line 610  networking_stop() Line 611  networking_stop()
611   done   done
612    
613   # remove state dir   # remove state dir
614   if [ -d /var/run/wpa_supplicant ]   if [ -d /run/wpa_supplicant ]
615   then   then
616   rm -rf /var/run/wpa_supplicant   rm -rf /run/wpa_supplicant
617   fi   fi
618    
619   # delete user routes   # delete user routes

Legend:
Removed from v.1356  
changed lines
  Added in v.2063