r343 - in vdr/vdr-xxv/trunk/debian: . patches

Tobias Grimm pkg-vdr-dvb-changes@lists.alioth.debian.org
Mon, 28 Mar 2005 14:46:12 +0000


Author: tiber-guest
Date: 2005-03-28 14:46:10 +0000 (Mon, 28 Mar 2005)
New Revision: 343

Added:
   vdr/vdr-xxv/trunk/debian/patches/03_empty-pid-file.dpatch
Modified:
   vdr/vdr-xxv/trunk/debian/init
   vdr/vdr-xxv/trunk/debian/patches/00list
   vdr/vdr-xxv/trunk/debian/postinst
Log:
xxv: create/chown pidfile on start, dont putt xxv in group vdr anymore

Modified: vdr/vdr-xxv/trunk/debian/init
===================================================================
--- vdr/vdr-xxv/trunk/debian/init	2005-03-28 14:31:02 UTC (rev 342)
+++ vdr/vdr-xxv/trunk/debian/init	2005-03-28 14:46:10 UTC (rev 343)
@@ -78,7 +78,9 @@
 start()
 {
     create_temp
-    TEMPDIR=$TEMPDIR start-stop-daemon --start -b --pidfile $PIDFILE \
+    touch $PIDFILE
+    chown xxv $PIDFILE
+    TEMPDIR=$TEMPDIR start-stop-daemon --start --pidfile $PIDFILE \
       --nicelevel 19 -c $USER:$GROUP --exec $DAEMON -- $COMMANDLINE
 }
 

Modified: vdr/vdr-xxv/trunk/debian/patches/00list
===================================================================
--- vdr/vdr-xxv/trunk/debian/patches/00list	2005-03-28 14:31:02 UTC (rev 342)
+++ vdr/vdr-xxv/trunk/debian/patches/00list	2005-03-28 14:46:10 UTC (rev 343)
@@ -1,2 +1,3 @@
 01_libpath
 02_secure-grab
+03_empty-pid-file

Added: vdr/vdr-xxv/trunk/debian/patches/03_empty-pid-file.dpatch
===================================================================
--- vdr/vdr-xxv/trunk/debian/patches/03_empty-pid-file.dpatch	2005-03-28 14:31:02 UTC (rev 342)
+++ vdr/vdr-xxv/trunk/debian/patches/03_empty-pid-file.dpatch	2005-03-28 14:46:10 UTC (rev 343)
@@ -0,0 +1,24 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 03_empty-pid-file.dpatch by Tobias Grimm <tg@e-tobi.net>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Allow empty pid file.
+
+@DPATCH@
+diff -urNad vdr-xxv-0.20/bin/xxvd /tmp/dpep.JuRFuC/vdr-xxv-0.20/bin/xxvd
+--- vdr-xxv-0.20/bin/xxvd	2005-03-28 14:21:59.000000000 +0200
++++ /tmp/dpep.JuRFuC/vdr-xxv-0.20/bin/xxvd	2005-03-28 14:27:05.000000000 +0200
+@@ -107,8 +107,11 @@
+ 
+ # PID and forking stuff
+ if(! $killer and -e $PATHS->{PIDFILE}) {
+-    printf "Sorry, but xxvd is running with PID %s !\n", load_file($PATHS->{PIDFILE});
+-    exit(1);
++    my $loaded_pid = load_file($PATHS->{PIDFILE});
++    if ($loaded_pid) {
++        printf "Sorry, but xxvd is running with PID %s !\n", $loaded_pid;
++        exit(1);
++    }
+ } elsif($killer and ! -e $PATHS->{PIDFILE}) {
+     printf "PID File %s is not exist!\n", $PATHS->{PIDFILE};
+     &quit;

Modified: vdr/vdr-xxv/trunk/debian/postinst
===================================================================
--- vdr/vdr-xxv/trunk/debian/postinst	2005-03-28 14:31:02 UTC (rev 342)
+++ vdr/vdr-xxv/trunk/debian/postinst	2005-03-28 14:46:10 UTC (rev 343)
@@ -188,10 +188,8 @@
 
         db_stop
         
-        # user and group (xxv needs access to some vdr files and must therefore
-        # be a member of the group vdr)
-        setup_group "xxv"
-        setup_user "xxv" "vdr" /var/lib/vdr-xxv/ "XXV user"
+        # user and group xxv should use
+        setup_user "xxv" "xxv" /var/lib/vdr-xxv/ "XXV user"
         
         chown -R xxv:xxv /var/lib/vdr-xxv
         chown -R xxv:xxv /var/cache/vdr-xxv/doc