dhcp/12-dhcpd
Jiri Popelka 7b41fdb208 4.2.0-P2: fix for CVE-2010-3616 (#662326)
- Use upstream fix for #628258
- Provide versioned symbols for rpmlint
2010-12-13 12:08:24 +01:00

22 lines
623 B
Bash

#!/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
/bin/systemctl is-enabled dhcpd.service || 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
/bin/systemctl restart dhcpd.service || :
fi