[1919] in Moira Commits

home help back first fref pref prev next nref lref last post

/svn/moira r4058 - trunk/moira/gen

daemon@ATHENA.MIT.EDU (Garry Zacheiss)
Wed Nov 16 16:32:43 2011

Date: Wed, 16 Nov 2011 16:32:41 -0500
From: Garry Zacheiss <zacheiss@MIT.EDU>
Message-Id: <201111162132.pAGLWf3F014552@drugstore.mit.edu>
To: moira-commits@MIT.EDU
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Author: zacheiss
Date: 2011-11-16 16:32:41 -0500 (Wed, 16 Nov 2011)
New Revision: 4058

Modified:
   trunk/moira/gen/dhcp.sh
Log:
Add our ACL additions unless the printer doesn't use an IP acl.

Modified: trunk/moira/gen/dhcp.sh
===================================================================
--- trunk/moira/gen/dhcp.sh	2011-11-12 17:18:47 UTC (rev 4057)
+++ trunk/moira/gen/dhcp.sh	2011-11-16 21:32:41 UTC (rev 4058)
@@ -20,6 +20,7 @@
 BOOTFOOT=/var/boot/dhcpd.conf.foot
 BOOTFILE=/var/boot/dhcpd.conf
 PSWDFILE=/var/boot/hp.add
+ACLFILE=/var/boot/ip-acl.add
 
 # Alert if the tar file or other needed files do not exist
 test -r $TARFILE || exit $MR_MISSINGFILE
@@ -32,6 +33,10 @@
 
 # Append passwords, etc., to the new files
 for f in `find /var/boot/hp -name \*.new -print`; do
+    grep '^allow:' $f >/dev/null 2>&1
+    if [ $? = 0 ]; then
+        cat $ACLFILE >> $f
+    fi
     cat $PSWDFILE >> $f
     mv $f /var/boot/hp/`basename $f .new`
 done


home help back first fref pref prev next nref lref last post