rpms/bind/devel bind-chroot-admin.in, 1.16, 1.17 bind.spec, 1.162, 1.163

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Thu Feb 15 15:46:16 UTC 2007


Author: atkac

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

Modified Files:
	bind-chroot-admin.in bind.spec 
Log Message:
Minor cleanup in bind-chroot-admin script



Index: bind-chroot-admin.in
===================================================================
RCS file: /cvs/dist/rpms/bind/devel/bind-chroot-admin.in,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- bind-chroot-admin.in	9 Feb 2007 14:36:56 -0000	1.16
+++ bind-chroot-admin.in	15 Feb 2007 15:46:08 -0000	1.17
@@ -21,16 +21,6 @@
 #
 #
 BIND_CHROOT_PREFIX=${BIND_CHROOT_PREFIX:- at BIND_CHROOT_PREFIX@}
-
-if [ -e /etc/sysconfig/named ]; then
-  BIND_CHROOT_PREFIX_TEMP=`grep "^\s*ROOTDIR" "/etc/sysconfig/named"`
-  BIND_CHROOT_PREFIX_TEMP=${BIND_CHROOT_PREFIX_TEMP#*\=}
-  BIND_CHROOT_PREFIX_TEMP=${BIND_CHROOT_PREFIX_TEMP%#*}
-  if [ ! ${#BIND_CHROOT_PREFIX_TEMP} -eq 0 ]; then
-    BIND_CHROOT_PREFIX=$BIND_CHROOT_PREFIX_TEMP
-  fi
-fi
-
 BIND_DIR=${BIND_DIR:- at BIND_DIR@}
 
 function usage()
@@ -55,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
@@ -69,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"`;
@@ -223,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
@@ -291,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/devel/bind.spec,v
retrieving revision 1.162
retrieving revision 1.163
diff -u -r1.162 -r1.163
--- bind.spec	9 Feb 2007 14:36:56 -0000	1.162
+++ bind.spec	15 Feb 2007 15:46:08 -0000	1.163
@@ -17,7 +17,7 @@
 Name: 		bind
 License: 	BSD-like
 Version: 	9.3.4
-Release: 	6%{?dist}
+Release: 	7%{?dist}
 Epoch:   	31
 Url: 		http://www.isc.org/products/BIND/
 Buildroot: 	%{_tmppath}/%{name}-root
@@ -744,6 +744,9 @@
 :;
 
 %changelog
+* Thu Feb 15 2007 Adam Tkac <atkac at redhat.com> 31:9.3.4-7.fc7
+- minor cleanup in bind-chroot-admin script
+
 * Fri Feb 09 2007 Adam Tkac <atkac at redhat.com> 31:9.3.4-6.fc7
 - fixed broken bind-chroot-admin script (#227995)
 




More information about the fedora-cvs-commits mailing list