[Pkg-cups-devel] r169 - cupsys/branches/cups-1.2-ubuntu/debian

Martin Pitt mpitt at costa.debian.org
Wed Apr 12 17:32:06 UTC 2006


Author: mpitt
Date: Wed Apr 12 17:32:05 2006
New Revision: 169

Modified:
   cupsys/branches/cups-1.2-ubuntu/debian/changelog
   cupsys/branches/cups-1.2-ubuntu/debian/cupsys.init.d
Log:
* debian/cupsys.init.d: Pre-create access_log and error_log since cupsd
  can't create them as normal user.



Modified: cupsys/branches/cups-1.2-ubuntu/debian/changelog
==============================================================================
--- cupsys/branches/cups-1.2-ubuntu/debian/changelog	(original)
+++ cupsys/branches/cups-1.2-ubuntu/debian/changelog	Wed Apr 12 17:32:05 2006
@@ -9,8 +9,10 @@
     something for dapper.
   * debian/cupsys.init.d: Disable reload (it doesn't work as normal user),
     change force-reload to restart.
+  * debian/cupsys.init.d: Pre-create access_log and error_log since cupsd
+    can't create them as normal user.
 
- -- Martin Pitt <martin.pitt at ubuntu.com>  Wed, 12 Apr 2006 19:29:00 +0200
+ -- Martin Pitt <martin.pitt at ubuntu.com>  Wed, 12 Apr 2006 19:30:26 +0200
 
 cupsys (1.1.99.rc2-1) UNRELEASED-experimental; urgency=low
 

Modified: cupsys/branches/cups-1.2-ubuntu/debian/cupsys.init.d
==============================================================================
--- cupsys/branches/cups-1.2-ubuntu/debian/cupsys.init.d	(original)
+++ cupsys/branches/cups-1.2-ubuntu/debian/cupsys.init.d	Wed Apr 12 17:32:05 2006
@@ -26,6 +26,19 @@
 	chown root:lpadmin /usr/share/cups/model 2>/dev/null || true
 	chmod 3775 /usr/share/cups/model 2>/dev/null || true
 	mkdir -p `dirname "$PIDFILE"`
+
+	# create the logs file since cupsd can't
+	if [ ! -e /var/log/cups/access_log ]; then
+	     touch /var/log/cups/access_log
+	     chmod 640 /var/log/cups/access_log
+	     chown cupsys:lpadmin /var/log/cups/access_log
+	fi
+	if [ ! -e /var/log/cups/page_log ]; then
+	     touch /var/log/cups/page_log
+	     chmod 640 /var/log/cups/page_log
+	     chown cupsys:lpadmin /var/log/cups/page_log
+	fi
+
 	start-stop-daemon --start --quiet --oknodo --pidfile "$PIDFILE" --exec $DAEMON
 	;;
   stop)



More information about the Pkg-cups-devel mailing list