#
PATH=/sbin:/usr/sbin:/bin:/usr/bin
+run_pre_down() { :; }
+
. /etc/sysconfig/network
. /etc/rc.d/init.d/functions
. /lib/rc-scripts/functions.network
# set all major variables
setup_ip_param
+# anything you need done first
+run_pre_down
+
OTHERSCRIPT="/lib/rc-scripts/ifdown-${DEVICETYPE}"
# shutdown tleds software
#
PATH=/sbin:/usr/sbin:/bin:/usr/bin
+run_pre_up() { :; }
+
. /etc/sysconfig/network
. /etc/rc.d/init.d/functions
. /lib/rc-scripts/functions.network
SYSCTLDEVICE=$(echo ${DEVICE} | sed 's/\./\//g')
+# anything you need done first
+run_pre_up
+
OTHERSCRIPT="/lib/rc-scripts/ifup-${DEVICETYPE}"
if [ -x "$OTHERSCRIPT" ]; then
DISCOVERY=yes|no (starts discovery of remote IrDA devices)
fi
-# You can also run some other programs *after* device has been brought up or down.
-# Just create functions run_up() and run_down().
+# You can also run commands before/after a device has been brought up or down.
+# Just create functions run_up/run_pre_up/run_down/run_pre_down.
+run_pre_up()
+{
+ echo "This will be executed before device is brought up!"
+}
+
run_up()
{
echo "This will be executed after device is brought up!"
}
+run_pre_down()
+{
+ echo "This will be executed before device is brought down!"
+}
+
run_down()
{
echo "This will be executed after device is brought down!"