/[vps]/baselayout-vserver/branches/baselayout-1_12/net-scripts/net.modules.d/ifconfig
Gentoo

Diff of /baselayout-vserver/branches/baselayout-1_12/net-scripts/net.modules.d/ifconfig

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

Revision 205 Revision 206
40# 40#
41# Returns 1 if the interface exists, otherwise 0 41# Returns 1 if the interface exists, otherwise 0
42ifconfig_exists() { 42ifconfig_exists() {
43 local e=$( ifconfig -a | grep -o "^$1" ) report="${2:-false}" 43 local e=$( ifconfig -a | grep -o "^$1" ) report="${2:-false}"
44 [[ -n ${e} ]] && return 0 44 [[ -n ${e} ]] && return 0
45 ${report} && eerror "$1 does not exist" 45
46 if ${report} ; then
47 eerror "network interface $1 does not exist"
48 eerror "Please verify hardware or kernel module (driver)"
49 fi
50
46 return 1 51 return 1
47} 52}
48 53
49# void ifconfig_up(char *iface) 54# void ifconfig_up(char *iface)
50# 55#

Legend:
Removed from v.205  
changed lines
  Added in v.206

  ViewVC Help
Powered by ViewVC 1.1.20