diff options
author | Christian Heim <phreak@gentoo.org> | 2005-11-22 13:58:47 +0000 |
---|---|---|
committer | Christian Heim <phreak@gentoo.org> | 2005-11-22 13:58:47 +0000 |
commit | 4f0bfc954583c430ac42d9eeb55d7e730deed7d7 (patch) | |
tree | 9fab18819430700139c0fbcf181ae530e504a4fc /net-scripts/net.modules.d/vlan | |
parent | Merging latest changes from baselayout (r1621). (diff) | |
download | baselayout-vserver-4f0bfc954583c430ac42d9eeb55d7e730deed7d7.tar.gz baselayout-vserver-4f0bfc954583c430ac42d9eeb55d7e730deed7d7.tar.bz2 baselayout-vserver-4f0bfc954583c430ac42d9eeb55d7e730deed7d7.zip |
Uberlord did a commit right after my, so i'm syncing it again; but this time to r1622.
svn path=/baselayout-vserver/trunk/; revision=69
Diffstat (limited to 'net-scripts/net.modules.d/vlan')
-rw-r--r-- | net-scripts/net.modules.d/vlan | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/net-scripts/net.modules.d/vlan b/net-scripts/net.modules.d/vlan index 2c6894e..e35196a 100644 --- a/net-scripts/net.modules.d/vlan +++ b/net-scripts/net.modules.d/vlan @@ -22,13 +22,21 @@ vlan_depend() { # bool vlan_check_installed(void) # -# Returns 1 if vconfig is installed, otherwise 0 +# Returns 0 if vconfig is installed, otherwise 1 vlan_check_installed() { [[ -x /sbin/vconfig ]] && return 0 ${1:-false} && eerror "For VLAN (802.1q) support, emerge net-misc/vconfig" return 1 } +# bool vlan_exists(char *interface) +# +# Returns 0 if the interface is a vlan, otherwise 1 +vlan_exists() { + [[ ! -d /proc/net/vlan ]] && return 1 + egrep -q "^$1[[:space:]]+" /proc/net/vlan/config +} + # char* vlan_get_vlans(char *interface) # # Fetch the configured vlans for an interface. Outputs a space |