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
|
[ "$VERBOSE" = yes ] && verbose=-v
|
||||||
|
|
||||||
|
perf_options() {
|
||||||
|
# At bootup lets set perfmode
|
||||||
|
[ -f /var/run/network/ifstatenew ] && echo -n "" && return
|
||||||
|
|
||||||
|
echo -n "--perfmode"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
process_exclusions() {
|
process_exclusions() {
|
||||||
set -- $EXCLUDE_INTERFACES
|
set -- $EXCLUDE_INTERFACES
|
||||||
@@ -116,8 +123,9 @@ start)
|
|||||||
fi
|
fi
|
||||||
set -f
|
set -f
|
||||||
exclusions=$(process_exclusions)
|
exclusions=$(process_exclusions)
|
||||||
|
perfoptions=$(perf_options)
|
||||||
log_action_begin_msg "Configuring network interfaces"
|
log_action_begin_msg "Configuring network interfaces"
|
||||||
if ifup -a $verbose --perfmode
|
if ifup -a $verbose $perfoptions
|
||||||
then
|
then
|
||||||
log_action_end_msg $?
|
log_action_end_msg $?
|
||||||
else
|
else
|
||||||
|
@@ -66,7 +66,8 @@ class ifupdownBase(object):
|
|||||||
return os.path.exists('/sys/class/net/%s' %ifacename)
|
return os.path.exists('/sys/class/net/%s' %ifacename)
|
||||||
|
|
||||||
def link_up(self, 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):
|
def link_down(self, ifacename):
|
||||||
self.exec_command('ip link set dev %s down' %ifacename)
|
self.exec_command('ip link set dev %s down' %ifacename)
|
||||||
|
@@ -108,7 +108,8 @@ class ifupdownMain(ifupdownBase):
|
|||||||
self.modules = OrderedDict({})
|
self.modules = OrderedDict({})
|
||||||
self.module_attrs = {}
|
self.module_attrs = {}
|
||||||
self.load_addon_modules(self.addon_modules_dir)
|
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({})
|
self.dependency_graph = OrderedDict({})
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
Reference in New Issue
Block a user