rpms/bind/FC-6 bind-chroot-admin.in, 1.14, 1.15 bind.spec, 1.147, 1.148

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Mon Feb 26 13:01:33 UTC 2007


Author: atkac

Update of /cvs/dist/rpms/bind/FC-6
In directory cvs.devel.redhat.com:/tmp/cvs-serv23216/bind/FC-6

Modified Files:
	bind-chroot-admin.in bind.spec 
Log Message:
bind-chroot-admin now determines ROOTDIR correctly



Index: bind-chroot-admin.in
===================================================================
RCS file: /cvs/dist/rpms/bind/FC-6/bind-chroot-admin.in,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- bind-chroot-admin.in	30 Nov 2006 09:31:59 -0000	1.14
+++ bind-chroot-admin.in	26 Feb 2007 13:01:31 -0000	1.15
@@ -45,11 +45,14 @@
 	if [ -L "$BIND_CHROOT_PREFIX" ]; then
 	    BIND_CHROOT_PREFIX=`/usr/bin/readlink "$BIND_CHROOT_PREFIX"`;
 	fi
-	return 0;
+	ENABLED=0;
+    else
+	ENABLED=1;
     fi;
-    return 1;
 }
 
+rootdir;
+
 function selinux_enabled()
 {
     while read d mp fs rest; do if [ "$fs" = "selinuxfs" ]; then return 0; fi; done < /proc/mounts
@@ -59,12 +62,9 @@
 function check_dirs()
 {
     if [ -z "$BIND_CHROOT_PREFIX" ]; then
-	rootdir;
-	if [ -z "$BIND_CHROOT_PREFIX" ]; then
-	    usage;
-	    exit 1;
-	fi;
-    fi
+        usage;
+        exit 1;
+    fi;
     BIND_DIR=`echo $BIND_DIR | sed 's#//*#/#g;s#/$##'`;
     if [ -L "$BIND_DIR" ]; then
 	BIND_DIR=`/usr/bin/readlink "$BIND_DIR"`;
@@ -213,7 +213,7 @@
     pfx=''
     changed=`/bin/mktemp /tmp/XXXXXX`;
     rm -f $changed
-    if rootdir ; then # chroot is enabled
+    if [ $ENABLED -eq 0 ] ; then # chroot is enabled
 	/usr/bin/find /{etc/{named.*,rndc.*},${BIND_DIR#/}{/*,/data/*,/slaves/*}}  -maxdepth 0 -type f |
 	while read f;
         do
@@ -281,7 +281,7 @@
 
 function clean_root()
 {
-    if ! rootdir ; then # chroot is disabled, clean it up
+    if [ $ENABLED -eq 0 ] ; then # chroot is disabled, clean it up
         if [ -n "${BIND_CHROOT_PREFIX}" -a "x${BIND_CHROOT_PREFIX}" != "x/" ]; then
             rm -r ${BIND_CHROOT_PREFIX}/dev  >/dev/null 2>&1 || :;
             rmdir ${BIND_CHROOT_PREFIX}/proc >/dev/null 2>&1 || :;


Index: bind.spec
===================================================================
RCS file: /cvs/dist/rpms/bind/FC-6/bind.spec,v
retrieving revision 1.147
retrieving revision 1.148
diff -u -r1.147 -r1.148
--- bind.spec	5 Feb 2007 12:40:39 -0000	1.147
+++ bind.spec	26 Feb 2007 13:01:31 -0000	1.148
@@ -17,7 +17,7 @@
 Name: 		bind
 License: 	BSD-like
 Version: 	9.3.4
-Release: 	2%{?dist}
+Release: 	3%{?dist}
 Epoch:   	31
 Url: 		http://www.isc.org/products/BIND/
 Buildroot: 	%{_tmppath}/%{name}-root
@@ -777,6 +777,9 @@
 :;
 
 %changelog
+* Mon Feb 26 2007 Adam Tkac <atkac redhat com> 31:9.3.4-3.fc6
+- fixed broken bind-chroot-admin script
+
 * Mon Feb 05 2007 Adam Tkac <atkac at redhat.com> 31:9.3.4-2.fc6
 - fixed conflict between bind-sdb and ldap daemon
 - removed prever macro from release




More information about the fedora-cvs-commits mailing list