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
Reply to: