[Pkg-cups-devel] r325 - in cupsys/branches/cups-1.2-ubuntu/debian: local

Martin Pitt mpitt at costa.debian.org
Mon Jul 24 08:50:48 UTC 2006


Author: mpitt
Date: Mon Jul 24 08:50:47 2006
New Revision: 325

Modified:
   cupsys/branches/cups-1.2-ubuntu/debian/changelog
   cupsys/branches/cups-1.2-ubuntu/debian/local/browsing_status
   cupsys/branches/cups-1.2-ubuntu/debian/local/enable_browsing
   cupsys/branches/cups-1.2-ubuntu/debian/local/enable_sharing
   cupsys/branches/cups-1.2-ubuntu/debian/local/sharing_status

Log:
* debian/local/enable_{sharing,browsing}, {sharing,browsing}_status: Adapt
  to new single configuration file format.

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	Mon Jul 24 08:50:47 2006
@@ -20,8 +20,10 @@
     them).
   * cupsys.postinst: Fix permissions of cupsd.conf to be writable by user
     cupsys world-readable.
+  * debian/local/enable_{sharing,browsing}, {sharing,browsing}_status: Adapt
+    to new single configuration file format.
 
- -- Martin Pitt <martin.pitt at ubuntu.com>  Mon, 24 Jul 2006 10:34:16 +0200
+ -- Martin Pitt <martin.pitt at ubuntu.com>  Mon, 24 Jul 2006 10:47:13 +0200
 
 cupsys (1.2.1-4) unstable; urgency=medium
 

Modified: cupsys/branches/cups-1.2-ubuntu/debian/local/browsing_status
==============================================================================
--- cupsys/branches/cups-1.2-ubuntu/debian/local/browsing_status	(original)
+++ cupsys/branches/cups-1.2-ubuntu/debian/local/browsing_status	Mon Jul 24 08:50:47 2006
@@ -10,18 +10,14 @@
 # 2: the configuration was adapted manually; in this case enable_browsing cannot
 #    be used
 
-MAINCONF=/etc/cups/cupsd.conf
-BROWSECONF=/etc/cups/cups.d/browse.conf
+CONF=/etc/cups/cupsd.conf
 
-[ -f $MAINCONF -a -f $BROWSECONF ] || exit 2
+[ -f $CONF ] || exit 2
 
-# if BROWSECONF is not included -> custom
-egrep -qi "^[[:space:]]*Include[[:space:]]+($BROWSECONF|$(basename $BROWSECONF))[[:space:]]*(#.*)?\$" $MAINCONF || exit 2
-
-if egrep -qi '^[[:space:]]*Browsing[[:space:]]+(No|Off)[[:space:]]*(#.*)?$' $BROWSECONF; then
+if egrep -qi '^[[:space:]]*Browsing[[:space:]]+(No|Off)[[:space:]]*(#.*)?$' $CONF; then
     exit 0
 fi
-if egrep -qi '^[[:space:]]*Browsing[[:space:]]+(Yes|On)[[:space:]]*(#.*)?$' $BROWSECONF; then
+if egrep -qi '^[[:space:]]*Browsing[[:space:]]+(Yes|On)[[:space:]]*(#.*)?$' $CONF; then
     exit 1
 fi
 exit 2

Modified: cupsys/branches/cups-1.2-ubuntu/debian/local/enable_browsing
==============================================================================
--- cupsys/branches/cups-1.2-ubuntu/debian/local/enable_browsing	(original)
+++ cupsys/branches/cups-1.2-ubuntu/debian/local/enable_browsing	Mon Jul 24 08:50:47 2006
@@ -13,7 +13,7 @@
 # 1: enabled browsing
 # Return 0 on success, or 1 on failure (prints error to stderr)
 
-CONF=/etc/cups/cups.d/browse.conf
+CONF=/etc/cups/cupsd.conf
 STATUS_SCRIPT=/usr/share/cups/browsing_status
 
 [ -x $STATUS_SCRIPT ] || {
@@ -53,8 +53,8 @@
 # Automatically added by dh_installinit
 if [ -x "/etc/init.d/cupsys" ]; then
     if [ -x /usr/sbin/invoke-rc.d ]; then
-	invoke-rc.d cupsys restart || exit 0
+	invoke-rc.d cupsys force-reload || exit 0
     else
-	/etc/init.d/cupsys restart || exit 0
+	/etc/init.d/cupsys force-reload || exit 0
     fi
 fi

Modified: cupsys/branches/cups-1.2-ubuntu/debian/local/enable_sharing
==============================================================================
--- cupsys/branches/cups-1.2-ubuntu/debian/local/enable_sharing	(original)
+++ cupsys/branches/cups-1.2-ubuntu/debian/local/enable_sharing	Mon Jul 24 08:50:47 2006
@@ -14,7 +14,7 @@
 # Return 0 on success, or 1 on failure (prints error to stderr)
 
 STATUS_SCRIPT=/usr/share/cups/sharing_status
-PORTSCONF=/etc/cups/cups.d/ports.conf
+CONF=/etc/cups/cupsd.conf
 
 [ -x $STATUS_SCRIPT ] || {
     echo "Error: cannot execute $STATUS_SCRIPT" >&2
@@ -49,9 +49,9 @@
 
 
 if [ $1 = 0 ]; then
-	sed -ri "s/^[[:space:]]*(Port|Listen)[[:space:]]+631\\>/Listen localhost:631/i" $PORTSCONF
+	sed -ri "s/^[[:space:]]*(Port|Listen)[[:space:]]+631\\>/Listen 127.0.0.1:631/i" $CONF
 else
-	sed -ri "s/^[[:space:]]*Listen[[:space:]]+localhost:631\\>/Listen 631/i" $PORTSCONF
+	sed -ri "s/^[[:space:]]*Listen[[:space:]]+localhost:631\\>/Listen 631/i" $CONF
 fi
 	
 
@@ -59,8 +59,8 @@
 # Automatically added by dh_installinit
 if [ -x "/etc/init.d/cupsys" ]; then
     if [ -x /usr/sbin/invoke-rc.d ]; then
-	invoke-rc.d cupsys restart || exit 0
+	invoke-rc.d cupsys force-reload || exit 0
     else
-	/etc/init.d/cupsys restart || exit 0
+	/etc/init.d/cupsys force-reload || exit 0
     fi
 fi

Modified: cupsys/branches/cups-1.2-ubuntu/debian/local/sharing_status
==============================================================================
--- cupsys/branches/cups-1.2-ubuntu/debian/local/sharing_status	(original)
+++ cupsys/branches/cups-1.2-ubuntu/debian/local/sharing_status	Mon Jul 24 08:50:47 2006
@@ -10,18 +10,14 @@
 # 2: the configuration was adapted manually; in this case enable_sharing cannot
 #    be used
 
-MAINCONF=/etc/cups/cupsd.conf
-PORTSCONF=/etc/cups/cups.d/ports.conf
+CONF=/etc/cups/cupsd.conf
 
-[ -f $MAINCONF -a -f $PORTSCONF ] || exit 2
+[ -f $CONF ] || exit 2
 
-# if PORTSCONF is not included -> custom
-egrep -qi "^[[:space:]]*Include[[:space:]]+($PORTSCONF|$(basename $PORTSCONF))[[:space:]]*(#.*)?\$" $MAINCONF || exit 2
-
-if egrep -qi '^[[:space:]]*(Port|Listen)[[:space:]]+(631)[[:space:]]*(#.*)?$' $PORTSCONF; then
+if egrep -qi '^[[:space:]]*(Port|Listen)[[:space:]]+(631)[[:space:]]*(#.*)?$' $CONF; then
     exit 1
 fi
-if egrep -qi '^[[:space:]]*Listen[[:space:]]+(localhost:631)[[:space:]]*(#.*)?$' $PORTSCONF; then
+if egrep -qi '^[[:space:]]*Listen[[:space:]]+(localhost|127.0.0.1):631[[:space:]]*(#.*)?$' $CONF; then
     exit 0
 fi
 exit 2



More information about the Pkg-cups-devel mailing list