[25705] in Source-Commits

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

/svn/athena r25184 - trunk/debathena/config/apparmor-config/debian

daemon@ATHENA.MIT.EDU (Jonathan D Reed)
Wed Jun 29 08:46:03 2011

Date: Wed, 29 Jun 2011 08:45:57 -0400
From: Jonathan D Reed <jdreed@MIT.EDU>
Message-Id: <201106291245.p5TCjvF5025648@drugstore.mit.edu>
To: source-commits@mit.edu
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Author: jdreed
Date: 2011-06-29 08:45:56 -0400 (Wed, 29 Jun 2011)
New Revision: 25184

Modified:
   trunk/debathena/config/apparmor-config/debian/debathena-apparmor-config.postinst
Log:
* Ensure local directory exists
* Only do this on releases with dh_apparmor


Modified: trunk/debathena/config/apparmor-config/debian/debathena-apparmor-config.postinst
===================================================================
--- trunk/debathena/config/apparmor-config/debian/debathena-apparmor-config.postinst	2011-06-29 06:58:59 UTC (rev 25183)
+++ trunk/debathena/config/apparmor-config/debian/debathena-apparmor-config.postinst	2011-06-29 12:45:56 UTC (rev 25184)
@@ -85,9 +85,12 @@
 	fi
 
 	# Ensure local files exist
-	for f in usr.sbin.cupsd usr.sbin.ntpd; do
-	  [ -f "/etc/apparmor.d/local/$f" ] || touch "/etc/apparmor.d/local/$f"
-	done
+	if [ -x /usr/bin/dh_apparmor ]; then
+	  mkdir -p /etc/apparmor.d/local
+	  for f in usr.sbin.cupsd usr.sbin.ntpd; do
+	    [ -f "/etc/apparmor.d/local/$f" ] || touch "/etc/apparmor.d/local/$f"
+	  done
+	fi
 
 	if hash apparmor_status 2>/dev/null && apparmor_status --enabled; then
 	    if hash invoke-rc.d 2>/dev/null; then


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