RUN_DIR="/run/network"
IFSTATE="$RUN_DIR/ifstate"
+NAME=networking
+SCRIPTNAME=/etc/init.d/$NAME
+
[ -x /sbin/ifup ] || exit 0
[ -x /sbin/ifdown ] || exit 0
CONFIGURE_INTERFACES=yes
EXCLUDE_INTERFACES=
+REMOTE_SYSLOG_SERVER=
VERBOSE=no
verbose=
return
}
+is_bootup() {
+ # Return 0 if its bootup or return 1
+ [ -f /var/tmp/network/ifstatenew ] && return 1
+
+ return 0
+}
+
perf_options() {
# At bootup lets set perfmode
- [ -f /var/tmp/network/ifstatenew ] && echo -n "" && return
-
- echo -n "--perfmode"
+ if is_bootup ; then
+ echo -n "--perfmode"
+ else
+ echo -n ""
+ fi
}
process_exclusions() {
exclusions=$(process_exclusions)
perfoptions=$(perf_options)
log_action_begin_msg "Configuring network interfaces"
- if ifup -a $verbose $perfoptions
- then
- log_action_end_msg $?
+ if is_bootup ; then
+ ifup -a $verbose $perfoptions 2>&1 | /usr/bin/logger \
+ $REMOTE_SYSLOG_SERVER -s -i -t $SCRIPTNAME
else
- log_action_end_msg $?
+ ifup -a $verbose $perfoptions
fi
+ log_action_end_msg $?
;;
stop)