SHA256
1
0
forked from pool/dhcp
OBS User unknown 2007-03-15 17:17:55 +00:00 committed by Git OBS Bridge
parent d3351598a0
commit 97546f67c9
3 changed files with 23 additions and 6 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Thu Mar 15 18:07:35 CET 2007 - mt@suse.de
- Bug #181212: Improved dhcp init-script to copy directories
specified in the DHCPD_CONF_INCLUDE_FILES sysconfig variable
into the chroot jail.
-------------------------------------------------------------------
Wed Mar 14 12:15:11 CET 2007 - mt@suse.de

View File

@ -23,7 +23,7 @@ License: BSD License and BSD-like
Group: Productivity/Networking/Boot/Servers
Autoreqprov: on
Version: 3.0.5
Release: 20
Release: 21
Summary: Common Files Used by ISC DHCP Software
URL: http://www.isc.org/isc/dhcp.html
Source0: http://ftp.isc.org/isc/dhcp/dhcp-%{version}.tar.gz
@ -515,6 +515,10 @@ if ! test -f /.buildenv; then rm -rf $RPM_BUILD_ROOT; fi
%doc %{_mandir}/man3/dhcpctl.3.gz
%changelog
* Thu Mar 15 2007 - mt@suse.de
- Bug #181212: Improved dhcp init-script to copy directories
specified in the DHCPD_CONF_INCLUDE_FILES sysconfig variable
into the chroot jail.
* Wed Mar 14 2007 - mt@suse.de
- Bug #247365: Added installation of dhcp-server SuSEfirewall2
service definition file.

View File

@ -160,18 +160,24 @@ case "$1" in
## copy the conf file to the chroot jail (dhcpd has to be restarted anyway,
## when it has changed) and change path to leases file
for i in $DAEMON_CONF $DHCPD_CONF_INCLUDE_FILES; do
test -d $CHROOT_PREFIX/${i%/*} || mkdir -p $CHROOT_PREFIX/${i%/*}
if test -d "${i}" ; then
test -d "$CHROOT_PREFIX/${i}" || \
mkdir -p "$CHROOT_PREFIX/${i}"
elif test -e "${i}" ; then
test -d "$CHROOT_PREFIX/${i%/*}" || \
mkdir -p "$CHROOT_PREFIX/${i%/*}"
fi
done
rm -f $CHROOT_PREFIX/dev/urandom
for i in $DAEMON_CONF $DHCPD_CONF_INCLUDE_FILES /etc/{resolv.conf,host.conf,hosts,localtime} /dev/urandom; do
if ! test -e $i; then continue; fi # neither of them is absolutely necessary
cp -aL $i $CHROOT_PREFIX/$i &>/dev/null \
if ! test -e "$i"; then continue; fi # neither of them is absolutely necessary
cp -aL "$i" "$CHROOT_PREFIX/${i%/*}/" &>/dev/null \
|| { echo "...$0:$LINENO: could not copy $i to chroot jail"; rc_failed; rc_status -v1; exit 6; }
done
libdir=/$(basename $(echo /var/lib/dhcp/lib*))
for i in /$libdir/{libresolv.so.2,libnss_dns{,6}.so.2}; do
if [ -s $i ]; then
cp -pL $i /var/lib/dhcp/$libdir/ \
if [ -s "$i" ]; then
cp -pL "$i" "/var/lib/dhcp/$libdir/" \
|| { echo "...$0:$LINENO: could not copy $i to chroot jail"; rc_failed; rc_status -v1; exit 6; }
fi
done