]> git.proxmox.com Git - mirror_ifupdown2.git/commitdiff
workaround to fix dhcp delay at bootup
authorroopa <roopa@cumulusnetworks.com>
Thu, 20 Feb 2014 21:11:22 +0000 (13:11 -0800)
committerroopa <roopa@cumulusnetworks.com>
Thu, 20 Feb 2014 21:11:22 +0000 (13:11 -0800)
Ticket: CM-2317
Reviewed By:
Testing Done:

still investigating the iproute delay.

init.d/networking
pkg/ifupdownbase.py
pkg/ifupdownmain.py

index d428fcdf67f6392988f4f9b37c14383bead431ba..00c1eb474f356d5132d24f9886084c815b749e80 100644 (file)
@@ -28,6 +28,13 @@ verbose=
 
 [ "$VERBOSE" = yes ] && verbose=-v
 
+perf_options() {
+    # At bootup lets set perfmode
+    [ -f /var/run/network/ifstatenew ] && echo -n "" && return
+
+    echo -n "--perfmode"
+}
+
 
 process_exclusions() {
     set -- $EXCLUDE_INTERFACES
@@ -116,8 +123,9 @@ start)
        fi
        set -f
        exclusions=$(process_exclusions)
+       perfoptions=$(perf_options)
        log_action_begin_msg "Configuring network interfaces"
-       if ifup -a $verbose --perfmode
+       if ifup -a $verbose $perfoptions
        then
            log_action_end_msg $?
        else
index a6efb233236ac80b3f307cb224b64158410d4c4e..d8be16ced5cf1c57113ff9e5957d4293c8cbb0e7 100644 (file)
@@ -66,7 +66,8 @@ class ifupdownBase(object):
         return os.path.exists('/sys/class/net/%s' %ifacename)
 
     def link_up(self, ifacename):
-        self.exec_command('ip link set dev %s up' %ifacename)
+        #self.exec_command('ip link set dev %s up' %ifacename)
+        self.exec_command('ifconfig %s up' %ifacename)
 
     def link_down(self, ifacename):
         self.exec_command('ip link set dev %s down' %ifacename)
index 9719abc8f251d76d4f406bda8727bd9bff5d8e6d..240fb4b4a78a3dd7b12e2c12500d7c6c932704bc 100644 (file)
@@ -108,7 +108,8 @@ class ifupdownMain(ifupdownBase):
         self.modules = OrderedDict({})
         self.module_attrs = {}
         self.load_addon_modules(self.addon_modules_dir)
-        self.load_scripts(self.scripts_dir)
+        if self.COMPAT_EXEC_SCRIPTS:
+            self.load_scripts(self.scripts_dir)
         self.dependency_graph = OrderedDict({})
 
         try: