mirror of
https://github.com/CumulusNetworks/ifupdown2.git
synced 2024-05-06 15:54:50 +00:00
workaround to fix dhcp delay at bootup
Ticket: CM-2317 Reviewed By: Testing Done: still investigating the iproute delay.
This commit is contained in:
@@ -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
|
||||
|
@@ -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)
|
||||
|
@@ -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:
|
||||
|
Reference in New Issue
Block a user