diff options
author | William Hubbs <williamh@gentoo.org> | 2015-02-07 00:58:21 +0000 |
---|---|---|
committer | William Hubbs <williamh@gentoo.org> | 2015-02-07 00:58:21 +0000 |
commit | 9db5a2319d012e071d3445dd58a7a13fe737b53b (patch) | |
tree | 3334cf3e2a693b3f9bc6c6526b314a656dbc82ab /net-misc/dhcp/files | |
parent | Fixed DoS vulnerability. bug #539164 (diff) | |
download | historical-9db5a2319d012e071d3445dd58a7a13fe737b53b.tar.gz historical-9db5a2319d012e071d3445dd58a7a13fe737b53b.tar.bz2 historical-9db5a2319d012e071d3445dd58a7a13fe737b53b.zip |
Fix dhcpd init script if you are running dhcpd in a chroot with >=openrc-0.13.9. This should be backward compatible as well, thanks to poly-c for pointing it out.
Package-Manager: portage-2.2.15/cvs/Linux x86_64
Manifest-Sign-Key: 0x30C46538
Diffstat (limited to 'net-misc/dhcp/files')
-rwxr-xr-x | net-misc/dhcp/files/dhcpd.init5 | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/net-misc/dhcp/files/dhcpd.init5 b/net-misc/dhcp/files/dhcpd.init5 index 14c0b6af29f7..598edfb1e684 100755 --- a/net-misc/dhcp/files/dhcpd.init5 +++ b/net-misc/dhcp/files/dhcpd.init5 @@ -1,7 +1,7 @@ #!/sbin/runscript -# Copyright 1999-2012 Gentoo Foundation +# Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/files/dhcpd.init5,v 1.2 2012/11/11 21:42:02 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/files/dhcpd.init5,v 1.3 2015/02/07 00:58:12 williamh Exp $ extra_commands="configtest" @@ -9,7 +9,7 @@ extra_commands="configtest" depend() { need net - use logger dns #@slapd@ + use logger dns } get_var() { @@ -92,12 +92,13 @@ start() { -user dhcp -group dhcp \ ${chroot:+-chroot} ${chroot} ${DHCPD_IFACE} eend $? \ - && save_options chroot "${chroot}" \ + && save_options dhcpcd_chroot "${chroot}" \ && save_options pidfile "${pidfile}" } stop() { - local chroot="$(get_options chroot)" + local chroot="$(get_options dhcpd_chroot)" + [ -z "$chroot" && chroot="$(get_options chroot)" ebegin "Stopping ${chroot:+chrooted }${SVCNAME}" start-stop-daemon --stop --exec /usr/sbin/dhcpd \ |