I am running a natty narwhal server (fully updated) and I am trying to
set up a cups server. The cupsd process does not start. The cups
configuration is unaltered.

`start cups´ hangs forever. `stop cups´ also hangs forever. I can break
with ctrl-c  and then `stop cups´ succeeds if I run it a second time.
So, this bug is not fixed.

I altered some lines in the /etc/init/cups.conf file. The post-start
script looks like this now:


post-start script
    # wait until daemon is ready
    timeout=10
echo $timeout >> /tmp/TEST
    while [ ! -e /var/run/cups/cups.sock ]; do
        sleep 0.5
        timeout=$((${timeout} -1))
echo $timeout >> /tmp/TEST
        if [ "$timeout" -eq 0 ]; then
            echo "cupsd failed to create /var/run/cups/cups.sock, skipping 
automatic printer configuration" >&2
echo in the if statement >> /tmp/TEST
            exit 0
        fi
    done
echo after a while... >> /tmp/TEST
    # coldplug USB printers
    if type udevadm > /dev/null 2>&1 && [ -x /lib/udev/udev-configure-printer 
]; then
        for printer in `udevadm trigger --verbose --dry-run 
--subsystem-match=usb \
                --attr-match=bInterfaceClass=07 
--attr-match=bInterfaceSubClass=01 2>/dev/null || true; \
                        udevadm trigger --verbose --dry-run 
--subsystem-match=usb \
                --sysname-match='lp[0-9]*' 2>/dev/null || true`; do
            /lib/udev/udev-configure-printer add "${printer#/sys}"
        done
    fi
end script

The echo statements writing to /tmp/TEST are my additions. After running
start cups, waiting half a minute, /tmp/TEST contains the following:

10
9
8
7
6
5
4
3
2
1
0
in the if statement
10
9
8
7
6
5
4
3
2
1
0

So, it never arrives at the "echo after a while..." line I added, but
the post-start script seems to get executed again and again.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/672438

Title:
  cups upstart post-start script hangs forever when local socket is
  disabled

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to