dhcp/12-dhcpd
Jiri Popelka 9ba8b65c5c * Fri Jul 30 2010 Jiri Popelka <jpopelka@redhat.com> - 12:4.2.0-2
- Rename 10-dhclient to 11-dhclient (10-sendmail already exists)
- Add 12-dhcpd NM dispatcher script (#565921)
2010-08-02 11:33:46 +02:00

22 lines
596 B
Bash
Executable File

#!/bin/bash
export LC_ALL=C
[ -f /etc/sysconfig/dhcpd ] && . /etc/sysconfig/dhcpd
# restart dhcpd whenever $1 interface is brought up by NM (rhbz #565921)
if [ "$2" = "up" ]; then
# exit if the service is not configured to be started in the current runlevel
/sbin/chkconfig dhcpd || exit 0
# exit if dhcpd is not defined to listen on $1
# i.e. if there are interfaces defined in DHCPDARGS and $1 is not among them
if [ -n "${DHCPDARGS}" ] &&
[[ "${DHCPDARGS}" == *eth* ]] &&
[[ "${DHCPDARGS}" != *$1* ]]; then
exit 0
fi
# restart service
/sbin/service dhcpd restart || :
fi