Your message dated Thu, 23 Aug 2012 19:59:33 +0100
with message-id <20120823185933.GA18937@desktop>
and subject line Re: Bug#523399: [Pkg-cups-devel] Bug#523399: cups: 
/etc/init.d/cups - use POSIX command substitution $()
has caused the Debian Bug report #523399,
regarding cups: /etc/init.d/cups - use POSIX command substitution $()
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
523399: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=523399
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: cups
Version: 1.3.8-1lenny4.1
Severity: wishlist
Tags: patch


The following patch adjusts /etc/init.d/apache2 to use POSIX $()
command substitution[1].

[1]
http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_06_03

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 
'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.26-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_DK.UTF-8, LC_CTYPE=en_DK.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages cups depends on:
ii  adduser              3.110               add and remove users and groups
ii  cups-common          1.3.8-1lenny4.1     Common UNIX Printing System(tm) - 
ii  debconf [debconf-2.0 1.5.26              Debian configuration management sy
ii  ghostscript          8.64~dfsg-1         The GPL Ghostscript PostScript/PDF
ii  libavahi-compat-libd 0.6.24-3            Avahi Apple Bonjour compatibility 
ii  libc6                2.9-4               GNU C Library: Shared libraries
ii  libcups2             1.3.8-1lenny4.1     Common UNIX Printing System(tm) - 
ii  libcupsimage2        1.3.8-1lenny4.1     Common UNIX Printing System(tm) - 
ii  libdbus-1-3          1.2.12-1            simple interprocess messaging syst
ii  libgnutls26          2.6.4-2             the GNU TLS library - runtime libr
ii  libkrb53             1.6.dfsg.4~beta1-12 Transitional library package/krb4 
ii  libldap-2.4-2        2.4.11-1            OpenLDAP libraries
ii  libpam0g             1.0.1-9             Pluggable Authentication Modules l
ii  libpaper1            1.1.23+nmu1         library for handling paper charact
ii  libslp1              1.2.1-7.5           OpenSLP libraries
ii  lsb-base             3.2-22              Linux Standard Base 3.2 init scrip
ii  perl-modules         5.10.0-19           Core Perl modules
ii  poppler-utils [xpdf- 0.10.4-3            PDF utilitites (based on libpopple
ii  procps               1:3.2.7-11          /proc file system utilities
ii  ssl-cert             1.0.23              simple debconf wrapper for OpenSSL

Versions of packages cups recommends:
pn  avahi-utils              <none>          (no description available)
ii  cups-client              1.3.8-1lenny4.1 Common UNIX Printing System(tm) - 
ii  foomatic-filters         4.0-20090311-1  OpenPrinting printer support - fil
ii  smbclient                2:3.3.2-1       command-line SMB/CIFS clients for 

Versions of packages cups suggests:
ii  cups-bsd                 1.3.8-1lenny4.1 Common UNIX Printing System(tm) - 
pn  cups-driver-gutenprint   <none>          (no description available)
pn  cups-pdf                 <none>          (no description available)
ii  foomatic-db              20090301-2      OpenPrinting printer support - dat
ii  foomatic-db-engine       4.0-20090301-1  OpenPrinting printer support - pro
ii  hplip                    3.9.2-3         HP Linux Printing and Imaging Syst
pn  xpdf-korean | xpdf-japan <none>          (no description available)

-- debconf information excluded
>From 6a1ea6445dc3f06b980e7a33aba5345bdb87396d Mon Sep 17 00:00:00 2001
From: Jari Aalto <[email protected]>
Date: Fri, 10 Apr 2009 01:24:55 +0300
Subject: [PATCH] cups.init.d: use POSIX command substitution

Signed-off-by: Jari Aalto <[email protected]>
---
 cups.init.d |   19 ++++++++++++-------
 1 files changed, 12 insertions(+), 7 deletions(-)
 mode change 100644 => 100755 cups.init.d

diff --git a/cups.init.d b/cups.init.d
old mode 100644
new mode 100755
index 44aebb0..381fe0d
--- a/cups.init.d
+++ b/cups.init.d
@@ -30,7 +30,7 @@ fi
 
 # Get the timezone set.
 if [ -z "$TZ" -a -e /etc/timezone ]; then
-    TZ=`cat /etc/timezone`
+    TZ=$(cat /etc/timezone)
     export TZ
 fi
 
@@ -46,34 +46,39 @@ case "$1" in
        chown root:lpadmin /usr/share/ppd/custom 2>/dev/null || true
        chmod 3775 /usr/share/ppd/custom 2>/dev/null || true
 
-       mkdir -p `dirname "$PIDFILE"`
+       mkdir -p $(dirname "$PIDFILE")
        if [ "$LOAD_LP_MODULE" = "yes" -a -f /usr/lib/cups/backend/parallel \
              -a -f /proc/devices -a -f /proc/modules -a -x /sbin/modprobe ]; 
then
          modprobe -q lp || true
          modprobe -q ppdev || true
        fi
 
-       start-stop-daemon --start --quiet --oknodo --pidfile "$PIDFILE" --exec 
$DAEMON && success=1
+       start-stop-daemon --start --quiet --oknodo \
+           --pidfile "$PIDFILE" --exec $DAEMON && success=1
 
        log_end_msg $?
        restart_xprint
        ;;
   stop)
        log_begin_msg "Stopping $DESC: $NAME"
-       start-stop-daemon --stop --quiet --retry 5 --oknodo --pidfile $PIDFILE 
--name $NAME && success=1
+       start-stop-daemon --stop --quiet --retry 5 \
+           --oknodo --pidfile $PIDFILE --name $NAME && success=1
        log_end_msg $?
        restart_xprint
        ;;
   reload|force-reload)
        log_begin_msg "Reloading $DESC: $NAME"
-       start-stop-daemon --stop --quiet --pidfile $PIDFILE --name $NAME 
--signal 1 && success=1
+       start-stop-daemon --stop --quiet --pidfile $PIDFILE \
+          --name $NAME --signal 1 && success=1
        log_end_msg $?
        restart_xprint
        ;;
   restart)
        log_begin_msg "Restarting $DESC: $NAME"
-       if start-stop-daemon --stop --quiet --retry 5 --oknodo --pidfile 
$PIDFILE --name $NAME; then
-               start-stop-daemon --start --quiet --pidfile "$PIDFILE" --exec 
$DAEMON && success=1
+       if start-stop-daemon --stop --quiet --retry 5 \
+          --oknodo --pidfile $PIDFILE --name $NAME; then
+               start-stop-daemon --start --quiet --pidfile "$PIDFILE" \
+                   --exec $DAEMON && success=1
        fi
        log_end_msg $?
        restart_xprint
-- 
1.6.2.1


--- End Message ---
--- Begin Message ---
On Fri 10 Apr 2009 at 07:17:30 -0700, Martin Pitt wrote:

> severity 523399 wishlist
> thanks
> 
> Hello Jari,
> 
> Jari Aalto [2009-04-10 12:51 +0300]:
> > - The $() was introduced to POSIX to improve readability.
> > - The $() is more safe. It nests, and
> >   "...all characters between the parentheses make up the command; none
> >   are treated specially"[1]
> 
> I'm aware of those, but I don't use nesting in cups' init.d right now,
> and it works with any shell.
> 
> So, I keep this open, I might change it when I have another reason to
> change the init.d script anyway. But that shouldn't happen any time
> soon.

I'm closing it. Life is too short to wait. The bug submitter can re-open
it should he wish.

Regards,

Brian.

--- End Message ---

Reply via email to