c3eff2d298
Take maintainership. Tweak, flush and fix dependencies... Add some example on how to use hplip.
81 lines
3.3 KiB
Plaintext
81 lines
3.3 KiB
Plaintext
$OpenBSD: patch-check_py,v 1.4 2010/03/21 11:07:43 ajacoutot Exp $
|
|
--- check.py.orig Thu Feb 25 00:07:55 2010
|
|
+++ check.py Fri Mar 12 13:40:17 2010
|
|
@@ -344,7 +344,7 @@ try:
|
|
num_errors += 1
|
|
|
|
if cups_ok:
|
|
- cups_conf = '/etc/cups/cupsd.conf'
|
|
+ cups_conf = '${SYSCONFDIR}/cups/cupsd.conf'
|
|
|
|
try:
|
|
f = file(cups_conf, 'r')
|
|
@@ -375,11 +375,6 @@ try:
|
|
|
|
log.info(log.bold("Checking for dbus/python-dbus..."))
|
|
|
|
- if dcheck.check_ps(['dbus-daemon']):
|
|
- log.info("dbus daemon is running.")
|
|
- else:
|
|
- log.warn("dbus daemon is not running.")
|
|
-
|
|
try:
|
|
import dbus
|
|
try:
|
|
@@ -490,18 +485,18 @@ try:
|
|
log.info("HPLIP %s currently installed in '%s'." % (v, home))
|
|
|
|
log.info()
|
|
- log.info(log.bold("Current contents of '/etc/hp/hplip.conf' file:"))
|
|
+ log.info(log.bold("Current contents of '${SYSCONFDIR}/hp/hplip.conf' file:"))
|
|
try:
|
|
- output = file('/etc/hp/hplip.conf', 'r').read()
|
|
+ output = file('${SYSCONFDIR}/hp/hplip.conf', 'r').read()
|
|
except (IOError, OSError), e:
|
|
log.error("Could not access file: %s" % e.strerror)
|
|
else:
|
|
log.info(output)
|
|
|
|
log.info()
|
|
- log.info(log.bold("Current contents of '/var/lib/hp/hplip.state' file:"))
|
|
+ log.info(log.bold("Current contents of '/var/db/hp/hplip.state' file:"))
|
|
try:
|
|
- output = file(os.path.expanduser('/var/lib/hp/hplip.state'), 'r').read()
|
|
+ output = file(os.path.expanduser('/var/db/hp/hplip.state'), 'r').read()
|
|
except (IOError, OSError), e:
|
|
log.error("Could not access file: %s" % e.strerror)
|
|
else:
|
|
@@ -615,7 +610,7 @@ try:
|
|
#log.info("Installed in HPLIP?: %s" % x)
|
|
log.info("Device URI: %s" % device_uri)
|
|
|
|
- ppd = os.path.join('/etc/cups/ppd', printer_name + '.ppd')
|
|
+ ppd = os.path.join('${SYSCONFDIR}/cups/ppd', printer_name + '.ppd')
|
|
|
|
if os.path.exists(ppd):
|
|
log.info("PPD: %s" % ppd)
|
|
@@ -717,11 +712,11 @@ try:
|
|
|
|
if scanning_enabled:
|
|
tui.header("SANE CONFIGURATION")
|
|
- log.info(log.bold("'hpaio' in '/etc/sane.d/dll.conf'..."))
|
|
+ log.info(log.bold("'hpaio' in '${SYSCONFDIR}/sane.d/dll.conf'..."))
|
|
try:
|
|
- f = file('/etc/sane.d/dll.conf', 'r')
|
|
+ f = file('${SYSCONFDIR}/sane.d/dll.conf', 'r')
|
|
except IOError:
|
|
- log.error("'/etc/sane.d/dll.conf' not found. Is SANE installed?")
|
|
+ log.error("'${SYSCONFDIR}/sane.d/dll.conf' not found. Is SANE installed?")
|
|
num_errors += 1
|
|
else:
|
|
found = False
|
|
@@ -733,7 +728,7 @@ try:
|
|
log.info("OK, found. SANE backend 'hpaio' is properly set up.")
|
|
else:
|
|
num_errors += 1
|
|
- log.error("Not found. SANE backend 'hpaio' NOT properly setup (needs to be added to /etc/sane.d/dll.conf).")
|
|
+ log.error("Not found. SANE backend 'hpaio' NOT properly setup (needs to be added to ${SYSCONFDIR}/sane.d/dll.conf).")
|
|
|
|
log.info()
|
|
log.info(log.bold("Checking output of 'scanimage -L'..."))
|