mirror of
https://github.com/CumulusNetworks/ifupdown2.git
synced 2024-05-06 15:54:50 +00:00
minor init.d fixes
Ticket: CM-1438 Reviewed By: Testing Done:
This commit is contained in:
@@ -38,26 +38,6 @@ process_exclusions() {
|
|||||||
echo $exclusions
|
echo $exclusions
|
||||||
}
|
}
|
||||||
|
|
||||||
process_options() {
|
|
||||||
[ -e /etc/network/options ] || return 0
|
|
||||||
log_warning_msg "/etc/network/options still exists and it will be IGNORED! Please use /etc/sysctl.conf instead."
|
|
||||||
}
|
|
||||||
|
|
||||||
check_ifstate() {
|
|
||||||
if [ ! -d "$RUN_DIR" ] ; then
|
|
||||||
if ! mkdir -p "$RUN_DIR" ; then
|
|
||||||
log_failure_msg "can't create $RUN_DIR"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
if [ ! -r "$IFSTATE" ] ; then
|
|
||||||
if ! :> "$IFSTATE" ; then
|
|
||||||
log_failure_msg "can't initialise $IFSTATE"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
check_network_file_systems() {
|
check_network_file_systems() {
|
||||||
[ -e /proc/mounts ] || return 0
|
[ -e /proc/mounts ] || return 0
|
||||||
|
|
||||||
@@ -119,8 +99,6 @@ start)
|
|||||||
if init_is_upstart; then
|
if init_is_upstart; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
process_options
|
|
||||||
check_ifstate
|
|
||||||
|
|
||||||
if [ "$CONFIGURE_INTERFACES" = no ]
|
if [ "$CONFIGURE_INTERFACES" = no ]
|
||||||
then
|
then
|
||||||
@@ -154,7 +132,6 @@ stop)
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
reload)
|
reload)
|
||||||
process_options
|
|
||||||
|
|
||||||
log_action_begin_msg "Reloading network interfaces configuration"
|
log_action_begin_msg "Reloading network interfaces configuration"
|
||||||
state=$(cat /run/network/ifstate)
|
state=$(cat /run/network/ifstate)
|
||||||
@@ -170,7 +147,6 @@ force-reload|restart)
|
|||||||
if init_is_upstart; then
|
if init_is_upstart; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
process_options
|
|
||||||
|
|
||||||
#log_warning_msg "Running $0 $1 is deprecated because it may not re-enable some interfaces"
|
#log_warning_msg "Running $0 $1 is deprecated because it may not re-enable some interfaces"
|
||||||
log_action_begin_msg "Reconfiguring network interfaces"
|
log_action_begin_msg "Reconfiguring network interfaces"
|
||||||
|
Reference in New Issue
Block a user