[Oval-commits] r240 - trunk/oval-agent/debian
Javier Fernandez-Sanguino Pen~a
jfs at alioth.debian.org
Tue Sep 4 19:49:59 UTC 2007
Author: jfs
Date: 2007-09-04 19:49:59 +0000 (Tue, 04 Sep 2007)
New Revision: 240
Added:
trunk/oval-agent/debian/oval-agent.postinst
Log:
Create user and fix permissions of directories on postinst
Added: trunk/oval-agent/debian/oval-agent.postinst
===================================================================
--- trunk/oval-agent/debian/oval-agent.postinst (rev 0)
+++ trunk/oval-agent/debian/oval-agent.postinst 2007-09-04 19:49:59 UTC (rev 240)
@@ -0,0 +1,54 @@
+#!/bin/sh
+# postinst script for oval-agent
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <postinst> `abort-remove'
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+ configure)
+ if ! getent passwd oval >/dev/null; then
+ adduser --quiet --system --no-create-home \
+ --home /var/cache/oval-agent --disabled-password \
+ --disabled-login --shell /bin/false --group oval
+ fi
+
+ mkdir -p /var/cache/oval-agent
+ mkdir -p /var/cache/oval-agent/definitions
+ mkdir -p /var/cache/oval-agent/results
+ chown -R root:oval /var/log/oval
+ chown -R root:oval /var/cache/oval-agent
+ chmod -R 775 /var/log/oval
+ chmod -R 775 /var/cache/oval-agent
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ ;;
+
+ *)
+ 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
+
+
More information about the Oval-commits
mailing list