[cups.general] Partially answered--Real-world use of backend error handler?

Brandon S. Allbery KF8NH allbery at ece.cmu.edu
Sun Aug 20 18:11:51 PDT 2006


On Aug 20, 2006, at 21:01 , Michael wrote:

> Well I tried this approach and it didn't work.  This was what the  
> restart section of my cupsys file looked like:
>
> restart|force-reload)
>   echo -n "Restarting $DESC: $NAME"
>   if start-stop-daemon --stop --quiet --retry TERM/10 --oknodo -- 
> exec $DAEMON; then start-stop-daemon --start --quiet --background - 
> m --pidfile  /var/run/cups/cupsd.pid --exec $DAEMON -- -F
>   fi
>   echo "."
> lpadmin -p hp5l -E -v beh:/0/0/8/parallel:/dev/lp0
>   ;;
>
> However, when I did this:
> sudo /etc/init.d/cupsys restart
> I got this:
> Restarting Common Unix Printing System: cupsd.
> lpadmin: Unable to connect to server: Connection refused

start-stop-daemon forks into the background and returns immediately,  
so probably cupsd hadn't even been started yet when lpadmin ran.

> Would still appreciate any explanation of what's going on here,  
> plus any answers to the 3 "minor questions" in my original post.   
> Thanks!

My reply is message 9839 in cups.general.
http://www.cups.org/newsgroups.php?s9831+gcups.general+v9839+T0

-- 
brandon s. allbery     [linux,solaris,freebsd,perl]       
allbery at kf8nh.com
system administrator  [openafs,heimdal,too many hats]   
allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university       
KF8NH







More information about the cups mailing list