Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.
Hi all, please see this major site announcement: https://www.boards.ie/discussion/2058427594/boards-ie-2026

Cups printer woes

  • 25-03-2009 08:06PM
    #1
    Registered Users, Registered Users 2 Posts: 218 ✭✭


    Cups on debian server. Doesn't startup script doesn't work, but will work manually after startup.

    Tried commands "update-rc.d cups remove" and "update-rc.d -f cups defaults"

    var/log/cups/error_log:
    "Unable to bind socket for address 192.168.1.100:631 - Cannot assign requested address"

    I'm guessing the script is trying to run before the network is working???
    Simlinks for cups named S20cups, S35 and S40networking in rc folders - normal?

    Has anyone had any experience of this?

    Would an acceptable workaround be to create a bash script which checks if cups is running and if not starts cups, then cron it for every 10min or so? How would that go?
    ps aux | grep cups | grep -v grep
    if (?)
    /etc/init.d/cups start
    


Comments

  • Registered Users, Registered Users 2 Posts: 1,110 ✭✭✭Skrynesaver


    Tillotson wrote: »
    var/log/cups/error_log:
    "Unable to bind socket for address 192.168.1.100:631 - Cannot assign requested address"

    I'm guessing the script is trying to run before the network is working???
    Simlinks for cups named S20cups, S35 and S40networking in rc folders - normal?

    Init starts the individual init scripts in order, you guessed right, rename S20cups to S80cups, it's just a symlink to the actual init script in /etc/init.d

    hope this helps


  • Registered Users, Registered Users 2 Posts: 218 ✭✭Tillotson


    Looking closer I don't think this is the issue.
    The network and cups don't overlap on the same run level.
    It really is wreaking my head, especially as it works perfectly when restarted :(

    Thanks anyway


  • Registered Users, Registered Users 2 Posts: 218 ✭✭Tillotson


    In case anyone is interested I couldn't find an answer to this anywhere.
    I got around the problem by creating a new init.d script

    /etc/init.d/delayedCups:
    #!/bin/sh
    /usr/local/bin/restartCups &

    sudo chmod +x restartCups

    /usr/local/bin/restartCups:
    #!/bin/bash
    sleep 10
    /etc/init.d/cups restart

    Then:
    sudo update-rc.d delayedCups defaults

    Honestly I still don't understand the problem, just happy it now works :)


Advertisement