You are not logged in.

#1 2006-04-10 00:53:10

normc
Member
From: Ottawa, Canada
Registered: 2004-06-28
Posts: 277
Website

shut down error HPLIP

When I shut down I get an error for HPLIP no such file line 28
Line 28 indicated by *********************************
printing works fine on my hp 1610 all in one but not the scanner


!/bin/bash
# Startup/shutdown script for HPLIP
#
# Note, this script file must start before cupsd.
#
. /etc/rc.conf
. /etc/rc.d/functions

HPIODDIR=/usr/sbin
HPSSDDIR=/usr/share/hplip/
RUNDIR=/var/run

daemon() {
   $* >/dev/null 2>&1
   if [ $? -eq 0 ]; then
      stat_done
   else
      stat_fail
   fi
}

killproc() {
   pid=`pidof -s $1`
   pidfile=$RUNDIR/${1}.pid
   if [ -z $pid ]; then
      if [ -f $pidfile ]; then
         read pid < $pidfile
         kill $pid      ******************************* This is line 28
      fi     
   else
      kill $pid
   fi
   retval=$?
   if [ -f $pidfile ]; then
      rm $pidfile
   fi     
   if [ $retval -eq 0 ]; then
      stat_done
   else
      stat_fail
   fi
}

mystatus() {
   pid=`pidof -s $1`
   if [ -z $pid ]; then
      pidfile=$RUNDIR/${1}.pid
      if [ -f $pidfile ]; then
         read pid < $pidfile
      fi     
   fi

   if [ -n "$pid" ]; then
      echo $"$1 (pid $pid) is running..."
      return 0
   fi

   echo $"$1 is stopped"
   return 3
}

RETVAL=0

start() {
        stat_busy $"Starting hplip: hpiod ..."
        cd $HPIODDIR
        daemon ./hpiod
        RETVAL=$?
        [ $RETVAL = 0 ] && [ -d /var/lock/ ] && touch /var/lock/hpiod
        stat_busy "Starting hplip: hpssd ... "
        cd $HPSSDDIR
        daemon ./hpssd.py
        RETVAL=$?
        [ $RETVAL = 0 ] && [ -d /var/lock/ ] && touch /var/lock/hpssd.py
        killall -HUP cupsd > /dev/null 2>&1
        if [ -f /var/lock/hpiod -a -f /var/lock/hpssd.py ]; then
           touch /var/lock/hplip
           return 0
        else
           return 1
    fi
}

stop() {
        stat_busy "Stopping hplip: hpiod ... "
        killproc hpiod
        RETVAL=$?
        [ $RETVAL = 0 ] && rm -f /var/lock/hpiod
        stat_busy "Stopping hplip: hpssd... "
        killproc hpssd
        RETVAL=$?
        [ $RETVAL = 0 ] && rm -f /var/lock/hpssd.py
        for pidfile in $RUNDIR/*; do
       case "$( basename $pidfile )" in
               hpguid-*.pid)
                   read pid < $pidfile
                   kill $pid
                   rm $pidfile
       esac
        done
        if [ ! -f /var/lock/hpiod -o ! -f /var/lock/hpssd.py ]; then
            rm -f /var/lock/hplip
        fi
        return $RETVAL
}       

restart() {
        stop
        start
}       

case "$1" in
  start)
        start
        ;;
  stop)
        stop
        ;;
  restart)
        restart
        ;;
  status)
        mystatus hpiod
        mystatus hpssd
        ;;
  condrestart)
        [ -f /var/lock/hpiod ] && [ -f /var/lock/hpssd.py ] && restart || :
        ;;
  *)
        echo $"Usage: $0 {start|stop|status|restart|condrestart}"
        exit 1
esac

exit $?


Norm

Offline

#2 2006-04-13 13:32:37

VLegacy
Member
Registered: 2005-01-29
Posts: 44

Re: shut down error HPLIP

This may or may not be related to your issue, but I get an error message somewhat similar to yours when I stop hplip:

/etc/rc.d/hplip: line 28: kill: (5789) - No such process

In my case, it looks like the script tries to kill both hpiod and hpssd, but, despite the fact that both have .pid files (which contain their process id number) in /var/run, only hpiod is actually running. Thus, it throws an error when it tries to kill hpssd - the process whose id it got from /var/run/hpssd.pid doesn't exist. That's my understanding of it, anyway.

That said, though, I don't have a solution. My take on it was to just ignore the FAIL message, since nothing seemed to be wrong.

Offline

#3 2006-04-20 06:34:42

paul_au
Member
Registered: 2006-04-13
Posts: 38

Re: shut down error HPLIP

is your printer connected through usb or network? As it might have to do with shutting down the network interface.

Re your scanning, have you tried hp-toolbox to scan? You'll need the pyqt package to run it.

Offline

#4 2006-04-20 11:45:21

VLegacy
Member
Registered: 2005-01-29
Posts: 44

Re: shut down error HPLIP

My printer is a network printer. HPLIP starts up after and shuts down before my network interfaces.

I don't need to do any scanning, but I tried hp-toolbox out of curiosity, and it's interesting to note that it won't run. Here's its output

 HP Linux Imaging and Printing System (ver. 0.9.8)
 HP Device Manager ver. 6.0

 Copyright (c) 2003-5 Hewlett-Packard Development Company, LP
 This software comes with ABSOLUTELY NO WARRANTY.
 This is free software, and you are welcome to distribute it
 under certain conditions. See COPYING file for more details.

 [ERROR]: Unable to connect to HPLIP I/O. Check and make sure HPLIP is running.
 [ERROR]: Unable to create client object.

Offline

#5 2006-04-23 23:39:56

paul_au
Member
Registered: 2006-04-13
Posts: 38

Re: shut down error HPLIP

that msg from hp-toolbox seems a bit strange considering you can print to the printer.

Process i use (network already started, i manually start hplip as i don't always need to print):

# /etc/rc.d/hplip start
:: Starting hplip: hpiod ...                                             [DONE] 
:: Starting hplip: hpssd ...                                            [DONE] 

Then start cups

# /etc/rc.d/cups start
:: Starting CUPS Daemon                                              [DONE]

And when i run hp-toolbox it runs.  Sorry i can't seem to help you here, it seems a bit weird considering you can still print to it.  The only other thing i can suggest is maybe try the hplip-0.9.10-2 package from the testing repo.

--------------------------
Just incase you want to try for scanning you need

 pacman -S sane xsane 

Then on the last line of /etc/sane.d/dll.conf uncomment hpaio
then do:

# scanimage -L 

and it should show up your scanner.

Offline

#6 2006-04-24 00:11:19

VLegacy
Member
Registered: 2005-01-29
Posts: 44

Re: shut down error HPLIP

I have two machines running Arch, one using the standard repositories (hplip 0.9.8-1), and one using testing (hplip 0.9.10-2), and they both have this problem.

Thanks for your help.

Offline

#7 2006-04-24 01:39:44

normc
Member
From: Ottawa, Canada
Registered: 2004-06-28
Posts: 277
Website

Re: shut down error HPLIP

paul_au I tried your suggestion but it doesn't work for me. When I run hp-toolbox I still get

[ERROR]: Unable to connect to HPLIP I/O. Check and make sure HPLIP is running.
[ERROR]: Unable to create client object.
[
I can print fine.


Norm

Offline

#8 2006-04-24 12:46:45

jaboua
Member
Registered: 2005-11-05
Posts: 634

Re: shut down error HPLIP

normc wrote:

paul_au I tried your suggestion but it doesn't work for me. When I run hp-toolbox I still get

[ERROR]: Unable to connect to HPLIP I/O. Check and make sure HPLIP is running.
[ERROR]: Unable to create client object.
[
I can print fine.

I get this error every time I start one of the hp utilities (it's been doing it for two months or something, since I first tried hplip, was using the gimp-print drivers iirc before that), but printing works fine here too:

HP Linux Imaging and Printing System (ver. 0.9.8)
Device Information Utility ver. 3.3

Copyright (c) 2003-5 Hewlett-Packard Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

[ERROR]: No devices found.
[ERROR]: Error occured during interactive mode. Exiting.

Offline

Board footer

Powered by FluxBB