]> git.pld-linux.org Git - projects/rc-scripts.git/commitdiff
- ifdown should now work for user-controled interfaces
authorJacek Konieczny <jajcus@pld-linux.org>
Mon, 20 Dec 1999 19:36:27 +0000 (19:36 +0000)
committerJacek Konieczny <jajcus@pld-linux.org>
Mon, 20 Dec 1999 19:36:27 +0000 (19:36 +0000)
svn-id: @621

sysconfig/network-scripts/ifdown

index 40d9aa8d5515822ccce3d2fc232b281239739103..74b0ed041d1099085f67e72cce65b340ace9a838 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-#      $Id: ifdown,v 1.19 1999/12/19 16:04:29 jajcus Exp $
+#      $Id: ifdown,v 1.20 1999/12/20 19:36:27 jajcus Exp $
 #
 PATH=/sbin:/usr/sbin:/bin:/usr/bin
 
@@ -15,14 +15,6 @@ DEV=$1
 . /etc/rc.d/init.d/functions
 . /etc/sysconfig/network-scripts/.functions
 
-if [ `id -u` != 0 ]; then
-    if [ -x /sbin/usernetctl ]; then
-        exec /sbin/usernetctl $CONFIG down
-    fi
-    echo "Users cannot control this device." >&2
-    exit 1
-fi
-
 IFCONFIGS="`ls /etc/sysconfig/interfaces/ifcfg-*|egrep -v '~$'`"
 if [ "$IFCONFIGS" ]; then
     IFCONFIGS="`egrep -L '^#!' $IFCONFIGS`"
@@ -35,6 +27,14 @@ if [ -z "$CONFIG" ]; then
     CONFIG="$DEV"
 fi
 
+if [ `id -u` != 0 ]; then
+    if [ -x /sbin/usernetctl ]; then
+        exec /sbin/usernetctl $CONFIG down
+    fi
+    echo "Users cannot control this device." >&2
+    exit 1
+fi
+
 source_config
 
 # IPv4, IPv6 or both ?
This page took 0.045621 seconds and 4 git commands to generate.