]> git.proxmox.com Git - mirror_ifupdown2.git/blobdiff - sbin/ifupdown
execute 'up' on upper devices if ifup is called with --with-depends
[mirror_ifupdown2.git] / sbin / ifupdown
index b13dab4310554addc04ee8d5bc16458e1ba212d4..8e1b21c5b6c34c4b406f83e774628378ae1eee48 100755 (executable)
@@ -78,9 +78,6 @@ def run_query(args):
         if args.checkcurr:
             qop='query-checkcurr'
         elif args.running:
-            if not iflist:
-                iflist = [i for i in os.listdir('/sys/class/net/')
-                                    if os.path.isdir('/sys/class/net/%s' %i)]
             qop='query-running'
         elif args.raw:
             qop='query-raw'
@@ -96,6 +93,9 @@ def run_query(args):
                             args.perfmode or args.syntaxhelp or
                             (qop != 'query-checkcurr' and
                             qop != 'query-running')) else True)
+        if not iflist and qop == 'query-running':
+            iflist = [i for i in os.listdir('/sys/class/net/')
+                        if os.path.isdir('/sys/class/net/%s' %i)]
         logger.debug('creating ifupdown object ..')
         ifupdown_handle = ifupdownMain(withdepends=args.withdepends,
                                        perfmode=args.perfmode,