hplip è sparito [RISOLTO]

Se avete problemi con l'installazione e la configurazione di Slackware postate qui. Non usate questo forum per argomenti generali... per quelli usate Gnu/Linux in genere.

Moderatore: Staff

Regole del forum
1) Citare sempre la versione di Slackware usata, la versione del Kernel e magari anche la versione della libreria coinvolta. Questi dati aiutano le persone che possono rispondere.
2) Per evitare confusione prego inserire in questo forum solo topic che riguardano appunto Slackware, se l'argomento è generale usate il forum Gnu/Linux in genere.
3) Leggere attentamente le risposte ricevute.
4) Scrivere i messaggi con il colore di default, evitare altri colori.
5) Scrivere in Italiano o in Inglese, se possibile grammaticalmente corretto, evitate stili di scrittura poco chiari, quindi nessuna abbreviazione tipo telegramma o scrittura stile SMS o CHAT.
6) Appena registrati è consigliato presentarsi nel forum dedicato.

La non osservanza delle regole porta a provvedimenti di vari tipo da parte dello staff, in particolare la non osservanza della regola 5 porta alla cancellazione del post e alla segnalazione dell'utente. In caso di recidività l'utente rischia il ban temporaneo.
Rispondi
Avatar utente
Burroughs
Linux 4.x
Linux 4.x
Messaggi: 1076
Iscritto il: mer 15 dic 2004, 0:00
Nome Cognome: Andrea Lutri
Kernel: 3.16.0
Desktop: KDE SC 4.13.3
Distribuzione: Arch Linux
Località: Glasgow
Contatta:

hplip è sparito [RISOLTO]

Messaggio da Burroughs »

Buon caldo a tutti!
Per motivi sconosciuti, sulla mia 12.1, non mi ritrovo lo script /etc/rc.d/rc.hplip, questo nonostante abbia installato il binario che, comunque, ad essere onesto, non mi crea lo script di cui sopra.
Qualche anima pia potrebbe farmi un cat dello script in oggetto o dirmi quale pacchetto installare per ricrearlo?
Saludos,

Burroughs.
Ultima modifica di Burroughs il mer 25 giu 2008, 19:12, modificato 1 volta in totale.
"Two things are infinite: the universe and human stupidity; and I'm not sure about the universe" (Albert Einstein)

Avatar utente
tigerwalk
Linux 3.x
Linux 3.x
Messaggi: 895
Iscritto il: lun 25 feb 2008, 22:08
Nome Cognome: Giuliano della Vecchia
Slackware: 13.37-14.2
Kernel: 3.10.17-tiger / 4.4.88-smp
Desktop: kde4/xfce4
Località: Napoli

Re: hplip è sparito

Messaggio da tigerwalk »

Burroughs ha scritto:Buon caldo a tutti!
Per motivi sconosciuti, sulla mia 12.1, non mi ritrovo lo script /etc/rc.d/rc.hplip, questo nonostante abbia installato il binario che, comunque, ad essere onesto, non mi crea lo script di cui sopra.
Qualche anima pia potrebbe farmi un cat dello script in oggetto o dirmi quale pacchetto installare per ricrearlo?
Saludos,

Burroughs.
Questo è il mio, è "vergine", non è stato toccato da quando ho installato, spero possa servirti!

Codice: Seleziona tutto

#! /bin/bash
#
# Startup/shutdown script for HPLIP 
#
# Note, this script file must start before cupsd.
#
# For chkconfig the HPLIP priority (ie: 50) must be less the cupsd 
# priority (ie: 55).
#
# For LSB install_initd the cups script file should have "hplip" in the
# Should-Start field.
# 
#   chkconfig: 2345 50 10
#   description: Start/stop script for HP Linux Imaging and Printing (HPLIP).
#
# (c) 2004 Copyright Hewlett-Packard Development Company, LP
#
### BEGIN INIT INFO
# Provides: hplip
# Required-Start:
# Required-Stop:
# Should-Start:
# Should-Stop:
# Default-Start: 3 5
# Default-Stop: 
# Description: Start/stop script for HP Linux Imaging and Printing (HPLIP)
### END INIT INFO

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

if [ -f /etc/init.d/functions ] ; then
. /etc/init.d/functions
else

export PATH="/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin"
export LC_ALL="POSIX"
export LANG="POSIX"
umask 022

daemon() {
   $* >/dev/null 2>&1
   if [ $? -eq 0 ]; then
      echo -ne "                                           [  OK  ]\r"
   else
      echo -ne "                                           [FAILED]\r"
   fi
}

killproc() {
   pid=`pidof -s $1`
   pidfile=$RUNDIR/${1}.pid
   if [ -z $pid ]; then
      if [ -f $pidfile ]; then
         read pid < $pidfile
         kill $pid
      fi      
   else
      kill $pid
   fi
   retval=$?
   if [ -f $pidfile ]; then
      rm $pidfile
   fi      
   if [ $retval -eq 0 ]; then
      echo -ne "                                           [  OK  ]\r"
   else
      echo -ne "                                           [FAILED]\r"
   fi
}

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() {
        echo -n $"Starting hpiod: "
        cd $HPIODDIR
        daemon ./hpiod
        RETVAL=$?
        echo
        [ $RETVAL = 0 ] && [ -d /var/lock/subsys ] && touch /var/lock/subsys/hpiod
        echo -n $"Starting hpssd: "
        cd $HPSSDDIR
        daemon ./hpssd.py
        RETVAL=$?
        echo
        [ $RETVAL = 0 ] && [ -d /var/lock/subsys ] && touch /var/lock/subsys/hpssd.py
#        killall -HUP cupsd
        if [ -f /var/lock/subsys/hpiod -a -f /var/lock/subsys/hpssd.py ]; then
           touch /var/lock/subsys/hplip
	fi
        return $RETVAL
}

stop() {
        echo -n $"Stopping hpiod: "
        killproc hpiod
        RETVAL=$?
        echo
        [ $RETVAL = 0 ] && rm -f /var/lock/subsys/hpiod
        echo -n $"Stopping hpssd: "
        killproc hpssd
        RETVAL=$?
        echo
        [ $RETVAL = 0 ] && rm -f /var/lock/subsys/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/subsys/hpiod -o ! -f /var/lock/subsys/hpssd.py ]; then
        	rm -f /var/lock/subsys/hplip
        fi
        return $RETVAL
}       

restart() {
        stop
        start
}       

debug() {
        # Allow core dumps.
        ulimit -c unlimited

        echo -n $"Starting hpiod: "
        cd $HPIODDIR
        ./hpiod >/dev/null 2>&1
        RETVAL=$?
        if [ $RETVAL -eq 0 ]; then
           echo -ne "                                           [  OK  ]\r"
        else
           echo -ne "                                           [FAILED]\r"
        fi
        echo
        [ $RETVAL = 0 ] && [ -d /var/lock/subsys ] && touch /var/lock/subsys/hpiod
        echo -n $"Starting hpssd: "
        cd $HPSSDDIR
        ./hpssd.py >/dev/null 2>&1
        RETVAL=$?
        if [ $RETVAL -eq 0 ]; then
           echo -ne "                                           [  OK  ]\r"
        else
           echo -ne "                                           [FAILED]\r"
        fi
        echo
        [ $RETVAL = 0 ] && [ -d /var/lock/subsys ] && touch /var/lock/subsys/hpssd.py
        if [ -f /var/lock/subsys/hpiod -a -f /var/lock/subsys/hpssd.py ]; then
           touch /var/lock/subsys/hplip
           return 0
        else
           return 1
	fi
}

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

exit $?

Avatar utente
Burroughs
Linux 4.x
Linux 4.x
Messaggi: 1076
Iscritto il: mer 15 dic 2004, 0:00
Nome Cognome: Andrea Lutri
Kernel: 3.16.0
Desktop: KDE SC 4.13.3
Distribuzione: Arch Linux
Località: Glasgow
Contatta:

Re: hplip è sparito

Messaggio da Burroughs »

tigerwalk ha scritto:Questo è il mio, è "vergine", non è stato toccato da quando ho installato, spero possa servirti![CUT]
Grazie, tigerwalk, ma purtroppo anche così non va.
Questo è l'output che ottengo quando avvio il demone:

Codice: Seleziona tutto

root@andy:~# /etc/rc.d/rc.hplip start
Starting hpiod: /bin/bash: ./hpiod: No such file or directory
                                                           [FAILED]
Starting hpssd:
HP Linux Imaging and Printing System (ver. 2.8.4)
Services and Status System Tray dBus Child Process ver. 10.1

Copyright (c) 2001-8 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.
Come si può notare, quando cerca di avviare hpssd va in loop.
Idee?

Burroughs.
"Two things are infinite: the universe and human stupidity; and I'm not sure about the universe" (Albert Einstein)

Avatar utente
gigiobagiano
Linux 3.x
Linux 3.x
Messaggi: 530
Iscritto il: dom 11 mar 2007, 12:58
Nome Cognome: Filippo
Slackware: 14.2
Kernel: vanilla-4.4.38
Desktop: xfce
Distribuzione: SalixOS
Contatta:

Re: hplip è sparito

Messaggio da gigiobagiano »

Non vorrei spararla troppo grossa (addurrò la scusa del caldo in caso), ma dalle ultime versioni di hplip non serve più il demone...

Avatar utente
conraid
Staff
Staff
Messaggi: 13631
Iscritto il: gio 14 lug 2005, 0:00
Nome Cognome: Corrado Franco
Slackware: current64
Desktop: kde
Località: Livorno
Contatta:

Re: hplip è sparito

Messaggio da conraid »

ha ragione gigiobagiano.

Dalla sacre scritture
HPLIP no longer requires daemons to be started at boot time, so any
/etc/rc.d/rc.hplip script should be removed.


There is a minor problem with the HPLIP and CUPS versions in Slackware 12.1;
hp-toolbox will not work unless LC_ALL is set to a UTF8 locale.
An easy workaround is to start it with "LC_ALL=$LANG.UTF8 hp-toolbox" if
you're not using a UTF8 locale. Also, your user account must be a member
of the "lp" group for hp-toolbox to work properly, and to use the scanner
portion of some (all?) HP print/scan/copy units, you'll need to be a member
of the "lp" group. This is due to the fact that hplip's udev rules set
the device with group "lp" ownership.

Avatar utente
Burroughs
Linux 4.x
Linux 4.x
Messaggi: 1076
Iscritto il: mer 15 dic 2004, 0:00
Nome Cognome: Andrea Lutri
Kernel: 3.16.0
Desktop: KDE SC 4.13.3
Distribuzione: Arch Linux
Località: Glasgow
Contatta:

Re: hplip è sparito

Messaggio da Burroughs »

gigiobagiano ha scritto:Non vorrei spararla troppo grossa (addurrò la scusa del caldo in caso), ma dalle ultime versioni di hplip non serve più il demone...
Chiedo venia... :oops:
A mia (parziale) scusante, a parte il caldo bestia e la solita fretta, il fatto che in /etc/rc.d/rc.M la procedura per inizializzare il demone sia ancora presente.

Burroughs.
"Two things are infinite: the universe and human stupidity; and I'm not sure about the universe" (Albert Einstein)

Rispondi