Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37708387
en ru br
ALT Linux repositórios
S:3.23.8-alt1
5.0: 2.8.10-alt3
4.1: 2.8.10-alt2.M41.1
4.0: 2.7.12-alt2.M40.1
+backports:2.8.10-alt2.M40.1
3.0:
+backports:1.6.6a-alt0.M30.4.1

Group :: Edição
RPM: hplip

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

#! /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: - 50 10
# description: HPLIP Services and Status Daemon (HPSSD) provides \
# persistent data and event services to HPLIP client applications. \
#
#
# (c) 2004 Copyright Hewlett-Packard Development Company, LP
# Adopted by Serge Volkov and Igor Vlasenko for ALT Linux Sisyphus
#
##############################################################
# removed (now is exotic configuration): Default-Start: 3 5
##############################################################
# now by default this script is not used, as hp-tools will
#
### BEGIN INIT INFO
# Provides: hplip
# Required-Start:
# Required-Stop:
# Should-Start:
# Should-Stop:
# Default-Start:
# Default-Stop:
# Description: HPLIP Services and Status Daemon (HPSSD) provides \
# persistent data and event services to HPLIP client applications.
### END INIT INFO

# Do not load RH compatibility interface.
WITHOUT_RC_COMPAT=1

# Source function library.
. /etc/init.d/functions

HPSSD_PIDFILE=/var/run/hpssd.pid
HPSSD_PORTFILE=/var/run/hpssd.port
HPSSD_LOCKFILE=/var/lock/subsys/hpssd
HPSSD=/usr/share/hplip/hpssd.py
#HPSSDDIR=/usr/share/hplip
PYTHON=/usr/bin/python
HPSSD_DISPLAY=hpssd.py
RETVAL=0

start()
{
start_daemon --pidfile "$HPSSD_PIDFILE" --lockfile "$HPSSD_LOCKFILE" --expect-user root -- $HPSSD
RETVAL=$?
return $RETVAL
}

stop()
{
stop_daemon --pidfile "$HPSSD_PIDFILE" --lockfile "$HPSSD_LOCKFILE" --expect-user root --displayname "$HPSSD_DISPLAY" -- $PYTHON
RETVAL=$?
[ $RETVAL -eq 0 ] && (rm -vf $HPSSD_PORTFILE)
return $RETVAL
}

restart() {
stop
start
}

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

reload()
{
msg_reloading HPSSD
stop_daemon --pidfile "$HPSSD_PIDFILE" --expect-user root -HUP -- $HPSSD
RETVAL=$?
return $RETVAL
}

# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
status)
status --pidfile "$HPSSD_PIDFILE" --expect-user root --displayname "$HPSSD_DISPLAY" -- $PYTHON
RETVAL=$?
;;
reload)
reload
;;
condstop)
[ -f "$HPSSD_LOCKFILE" ] && stop || :
;;
condrestart)
[ -f "$HPSSD_LOCKFILE" ] && restart || :
;;
condreload)
[ -f "$HPSSD_LOCKFILE" ] && reload || :
;;
debug)
debug
;;
*)
msg_usage "${0##*/} {start|stop|reload|restart|condstop|condrestart|condreload|status}"
RETVAL=1
esac
exit $RETVAL
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009