
* src/NetworkManagerDevice.[ch] src/NetworkManagerPolicy.c src/NetworkManager.c src/nm-dbus-nm.c - Remove the "just_added" parameter from nm_device_deactivate(). We no longer send the DeviceNoLongerActive signal unconditionally, but only when the device is actually active. * dispatcher-daemon/NetworkManagerDispatcher.c - (nmd_execute_scripts): convert to GLib directory functions from opendir(), and simplify the logic - (nmd_get_device_name): copy value from dbus reply so we don't segfault when we free it later on * initscript/RedHat/Makefile.am initscript/RedHat/NetworkManagerDispatcher - Add initscript for NetworkManagerDispatcher Patch from Bill Moss: * dispatcher-daemon/NetworkManagerDispatcher.c - Remove IP4AddressChange signal code including nmd_get_device_ip4_address() * src/NetworkManagerDbus.c - (nm_dbus_signal_device_ip4_address_change): remove. If the device goes up, and DeviceNowActive gets signaled, then the device has a new IP address anyway. There's no need for a separate signal. * src/NetworkManagerDevice.c - (nm_device_update_ip4_address): Don't send IP4AddressChange signal * src/NetworkManagerPolicy.c - (nm_policy_activation_finish): Send DeviceNowActive signal when the device activates successfully. This kind of went missing when I reworked the activation code. git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@634 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
75 lines
1.3 KiB
Bash
Executable File
75 lines
1.3 KiB
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# NetworkManager: NetworkManagerDispatcher daemon
|
|
#
|
|
# chkconfig: - 98 02
|
|
# description: This daemon automatically runs scripts when NetworkManager \
|
|
# changes the network state.
|
|
#
|
|
# processname: NetworkManagerDispatcher
|
|
# pidfile: /var/run/NetworkManagerDispatcher.pid
|
|
#
|
|
|
|
# Sanity checks.
|
|
[ -x /usr/bin/NetworkManagerDispatcher ] || exit 1
|
|
|
|
# Source function library.
|
|
. /etc/rc.d/init.d/functions
|
|
|
|
# so we can rearrange this easily
|
|
processname=NetworkManagerDispatcher
|
|
servicename=NetworkManagerDispatcher
|
|
pidfile=/var/run/NetworkManagerDispatcher.pid
|
|
|
|
RETVAL=0
|
|
|
|
start()
|
|
{
|
|
echo -n $"Starting NetworkManagerDispatcher daemon: "
|
|
daemon --check $servicename $processname
|
|
RETVAL=$?
|
|
echo
|
|
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$servicename && echo `/sbin/pidof $processname` > $pidfile
|
|
}
|
|
|
|
stop()
|
|
{
|
|
echo -n $"Stopping NetworkManagerDispatcher daemon: "
|
|
|
|
killproc $servicename -TERM
|
|
RETVAL=$?
|
|
echo
|
|
if [ $RETVAL -eq 0 ]; then
|
|
rm -f /var/lock/subsys/$servicename
|
|
rm -f $pidfile
|
|
fi
|
|
}
|
|
|
|
# See how we were called.
|
|
case "$1" in
|
|
start)
|
|
start
|
|
;;
|
|
stop)
|
|
stop
|
|
;;
|
|
status)
|
|
status $processname
|
|
RETVAL=$?
|
|
;;
|
|
restart)
|
|
stop
|
|
start
|
|
;;
|
|
condrestart)
|
|
if [ -f /var/lock/subsys/$servicename ]; then
|
|
stop
|
|
start
|
|
fi
|
|
;;
|
|
*)
|
|
echo $"Usage: $0 {start|stop|status|restart|condrestart}"
|
|
;;
|
|
esac
|
|
exit $RETVAL
|