Add postinst + postrm scripts for Debian to create /smack directory
authorJoachim Wiedorn <ad_debian@joonet.de>
Wed, 9 May 2012 06:05:29 +0000 (09:05 +0300)
committerBrian McGillion <brian.mcgillion@intel.com>
Wed, 9 May 2012 06:05:29 +0000 (09:05 +0300)
debian/libsmack1.postinst [new file with mode: 0644]
debian/libsmack1.postrm [new file with mode: 0644]
debian/smack-utils.dirs

diff --git a/debian/libsmack1.postinst b/debian/libsmack1.postinst
new file mode 100644 (file)
index 0000000..784cdb6
--- /dev/null
@@ -0,0 +1,23 @@
+#!/bin/sh
+# postinst script for libsmack1
+#
+# see: dh_installdeb(1)
+
+set -e
+
+case "$1" in
+    configure|abort-upgrade|abort-remove|abort-deconfigure)
+        test ! -d /smack && mkdir /smack
+        ;;
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+        ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/libsmack1.postrm b/debian/libsmack1.postrm
new file mode 100644 (file)
index 0000000..74b2886
--- /dev/null
@@ -0,0 +1,23 @@
+#!/bin/sh
+# postrm script for libsmack1
+#
+# see: dh_installdeb(1)
+
+set -e
+
+case "$1" in
+    purge|abort-install|remove|upgrade|failed-upgrade|abort-upgrade|disappear)
+        test -d /smack && rm -rf /smack
+        ;;
+    *)
+        echo "postrm called with unknown argument \`$1'" >&2
+        exit 1
+        ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
index e4fd812..60ee5a3 100644 (file)
@@ -1,3 +1,2 @@
-smack
 etc/smack/accesses.d
 etc/smack/cipso.d