[Pkg-utopia-maintainers] Bug#452198: policykit: Support tmpfs /var/run

Martin Pitt martin.pitt at ubuntu.com
Tue Nov 20 21:51:20 UTC 2007


Package: policykit
Version: 0.6-1
Severity: normal
Tags: patch
User: ubuntu-devel at lists.ubuntu.com
Usertags: origin-ubuntu hardy ubuntu-patch

Hi!

PK currently breaks if /var/run is a tmpfs and thus /var/run/PolicyKit
does not exist. Attached patch introduces an init script which
rectifies this.

I used this changelog for Ubuntu:

  * Add debian/policykit.init: Create /var/run/PolicyKit if it does not exist.
    This happens if /var/run is on a tmpfs.
  * debian/rules: Install init script.

Thank you for considering,

Martin
-- 
Martin Pitt        http://www.piware.de
Ubuntu Developer   http://www.ubuntu.com
Debian Developer   http://www.debian.org
-------------- next part --------------
diff -u policykit-0.6/debian/rules policykit-0.6/debian/rules
--- policykit-0.6/debian/rules
+++ policykit-0.6/debian/rules
@@ -11,0 +12 @@
+DEB_DH_INSTALLINIT_ARGS := -r -- start 01 2 3 4 5 . stop 99 1 .
--- policykit-0.6.orig/debian/policykit.init
+++ policykit-0.6/debian/policykit.init
@@ -0,0 +1,31 @@
+#! /bin/sh
+### BEGIN INIT INFO
+# Provides:          policykit
+# Required-Start:    $local_fs
+# Required-Stop:     $local_fs
+# Default-Start:     2 3 4 5
+# Default-Stop:
+# Short-Description: Create PolicyKit runtime directories
+# Description:       Create directories which PolicyKit needs at runtime,
+#                    such as /var/run/PolicyKit
+### END INIT INFO
+
+# Author: Martin Pitt <martin.pitt at ubuntu.com>
+
+case "$1" in
+  start)
+	if ! [ -d /var/run/PolicyKit ]; then
+            mkdir -p /var/run/PolicyKit
+	    chown polkituser:polkituser /var/run/PolicyKit
+	    chmod 775 /var/run/PolicyKit
+        fi
+	;;
+  stop|restart|force-reload)
+	;;
+  *)
+	echo "Usage: $0 {start|stop|restart|force-reload}" >&2
+	exit 3
+	;;
+esac
+
+:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/pkg-utopia-maintainers/attachments/20071120/139601b7/attachment.pgp 


More information about the Pkg-utopia-maintainers mailing list