Bug#751368: cups-daemon: preinst exits prematurely
Hi Brian, Thanks for the visual answer ! :) Le vendredi, 13 juin 2014, 17.58:28 Brian Potkin a écrit : I am assuming that the purpose of cat default is to ensure the writingof ListenStream lines to cupsd-systemd-listen.conf when cupsd.conf does not contain them. However, with Listen localhost:631 and Port 631 both commented out cupsd-systemd-listen.conf has only the content of the heredoc. That's exactly the intended behavior. Let me explain: If cupsd.conf doesn't exist, that's most probably because we're installing cups with default configuration = write the default stanza (discussed in 751370). If cupsd.conf exists but has no Port nor Listen stanzas enabled, that's because the administrator disabled Port listening (leaving only the cups socket) completely. In this case, having no port reserved by systemd for cupsd is correct. Right? Cheers, OdyX -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#751368: cups-daemon: preinst exits prematurely
On Sat 14 Jun 2014 at 15:00:45 +0200, Didier 'OdyX' Raboud wrote: Hi Brian, Hi OdyX, Thanks for the visual answer ! :) Le vendredi, 13 juin 2014, 17.58:28 Brian Potkin a écrit : I am assuming that the purpose of cat default is to ensure the writing of ListenStream lines to cupsd-systemd-listen.conf when cupsd.conf does not contain them. However, with Listen localhost:631 and Port 631 both commented out cupsd-systemd-listen.conf has only the content of the heredoc. That's exactly the intended behavior. Let me explain: If cupsd.conf doesn't exist, that's most probably because we're installing cups with default configuration = write the default stanza (discussed in 751370). Fine. I had tested that bit and then went on to confuse myself. If cupsd.conf exists but has no Port nor Listen stanzas enabled, that's because the administrator disabled Port listening (leaving only the cups socket) completely. In this case, having no port reserved by systemd for cupsd is correct. Thank you for the explanation. The advice It has to be kept in sync with the Port and . should have been sufficient for me. If you think I got my sockets and ports mixed up you wouldn't be far wrong. :) Regards, Brian. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#751368: cups-daemon: preinst exits prematurely
On Thu 12 Jun 2014 at 10:53:08 +0200, Didier 'OdyX' Raboud wrote: Control: tags -1 +moreinfo Le jeudi, 12 juin 2014, 09.02:05 Brian Potkin a écrit : The preinst script has a misplaced 'fi' after ListenStream=[::1]:$localport EOF Shouldn't the statement read if elif ... else ... fi ? The preinst code without the lengthy heredocs is as follows: # If file doesn't exist or if it has two conflicting stanzas if [ ! -f /etc/cups/cupsd-systemd-listen.conf ] || (…) ;\ then mkdir -p /etc/cups # cat header if [ -e /etc/cups/cupsd.conf ]; then if grep -q '^\s*Port' /etc/cups/cupsd.conf 2/dev/null; then # get Port port # cat Port elif grep -q '^\s*Listen localhost:' /etc/cups/cupsd.conf 2/dev/null; then # get ListenStream port # cat ListenStream fi -| else | # cat Default | fi | fi | | Where do you see a problem? | | I am assuming that the purpose of cat default is to ensure the writing | of ListenStream lines to cupsd-systemd-listen.conf when cupsd.conf does | not contain them. However, with Listen localhost:631 and Port 631 | both commented out cupsd-systemd-listen.conf has only the content of the | heredoc. | | I see the problem as this | Moving fi to after cat default solves the problem for me. # If file doesn't exist or if it has two conflicting stanzas if [ ! -f /etc/cups/cupsd-systemd-listen.conf ] || (…) ;\ then mkdir -p /etc/cups # cat header if [ -e /etc/cups/cupsd.conf ]; then if grep -q '^\s*Port' /etc/cups/cupsd.conf 2/dev/null; then # get Port port # cat Port elif grep -q '^\s*Listen localhost:' /etc/cups/cupsd.conf 2/dev/null; then # get ListenStream port # cat ListenStream else # cat Default fi fi fi Regards, Brian. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#751368: cups-daemon: preinst exits prematurely
Package: cups-daemon Version: 1.7.3-3_i386 Severity: normal The preinst script has a misplaced 'fi' after ListenStream=[::1]:$localport EOF Shouldn't the statement read if elif ... else ... fi ? Regards, Brian. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#751368: cups-daemon: preinst exits prematurely
Control: tags -1 +moreinfo Le jeudi, 12 juin 2014, 09.02:05 Brian Potkin a écrit : The preinst script has a misplaced 'fi' after ListenStream=[::1]:$localport EOF Shouldn't the statement read if elif ... else ... fi ? The preinst code without the lengthy heredocs is as follows: # If file doesn't exist or if it has two conflicting stanzas if [ ! -f /etc/cups/cupsd-systemd-listen.conf ] || (…) ;\ then mkdir -p /etc/cups # cat header if [ -e /etc/cups/cupsd.conf ]; then if grep -q '^\s*Port' /etc/cups/cupsd.conf 2/dev/null; then # get Port port # cat Port elif grep -q '^\s*Listen localhost:' /etc/cups/cupsd.conf 2/dev/null; then # get ListenStream port # cat ListenStream fi else # cat Default fi fi Where do you see a problem? Cheers, OdyX -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org