View | Details | Raw Unified | Return to bug 36509
Collapse All | Expand All

(-)old/etc/control.d/facilities/dhcpd-chroot (+19 lines)
Line 0 Link Here
1
#!/bin/sh
2
3
. /etc/control.d/functions
4
5
CONFIG=/etc/sysconfig/dhcpd
6
7
new_summary 'Chrootedness of the ISC DHCPD server'
8
9
new_subst disabled \
10
	'^CHROOT="-j / -lf /var/lib/dhcp/dhcpd/state/dhcpd.leases"$' \
11
	's/^#\(CHROOT="-j \/ -lf \/var\/lib\/dhcp\/dhcpd\/state\/dhcpd.leases"\)$/\1/'
12
new_help disabled 'Disable chrootedness of the ISC DHCPD server'
13
14
new_subst enabled \
15
	'^#CHROOT="-j / -lf /var/lib/dhcp/dhcpd/state/dhcpd.leases"$' \
16
	's/^CHROOT=/#&/'
17
new_help enabled 'Enable chrootedness of the ISC DHCPD server'
18
19
control_subst "$CONFIG" "$*"
(-)old/etc/rc.d/init.d/dhcpd (-1 / +1 lines)
Lines 37-43 Link Here
37
	is_yes "$NETWORKING" || return 0
37
	is_yes "$NETWORKING" || return 0
38
	if [ -e "$DHCPD_CONF" ]; then
38
	if [ -e "$DHCPD_CONF" ]; then
39
		action "Adjusting environment for dhcpd:" /etc/chroot.d/dhcpd.all ||:
39
		action "Adjusting environment for dhcpd:" /etc/chroot.d/dhcpd.all ||:
40
		start_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --expect-user dhcpd -- dhcpd $DHCPDARGS
40
		start_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --expect-user dhcpd -- dhcpd $CHROOT $DHCPDARGS
41
		RETVAL=$?
41
		RETVAL=$?
42
	else
42
	else
43
		msg_starting dhcpd
43
		msg_starting dhcpd
(-)old/etc/sysconfig/dhcpd (+2 lines)
Lines 1-3 Link Here
1
# The following variables are recognized:
1
# The following variables are recognized:
2
2
3
DHCPDARGS=""
3
DHCPDARGS=""
4
5
CHROOT="-j / -lf /var/lib/dhcp/dhcpd/state/dhcpd.leases"
(-)old/lib/systemd/system/dhcpd.service (-1 / +1 lines)
Lines 7-13 Link Here
7
[Service]
7
[Service]
8
ExecStartPre=/etc/chroot.d/dhcpd.all
8
ExecStartPre=/etc/chroot.d/dhcpd.all
9
EnvironmentFile=/etc/sysconfig/dhcpd
9
EnvironmentFile=/etc/sysconfig/dhcpd
10
ExecStart=/usr/sbin/dhcpd -4 -f --no-pid $DHCPDARGS
10
ExecStart=/usr/sbin/dhcpd -4 -f --no-pid $CHROOT $DHCPDARGS
11
11
12
[Install]
12
[Install]
13
WantedBy=multi-user.target
13
WantedBy=multi-user.target

Return to bug 36509