openbsd-ports/print/hplip/patches/patch-check_py
2010-09-08 07:13:16 +00:00

81 lines
3.4 KiB
Plaintext

$OpenBSD: patch-check_py,v 1.5 2010/09/08 07:13:16 ajacoutot Exp $
--- check.py.orig Mon Jul 19 04:17:45 2010
+++ check.py Wed Sep 8 08:34:10 2010
@@ -342,7 +342,7 @@ try:
log.warn("Version: (cups-config) Not available. Unable to determine installed version of CUPS.)")
if cups_ok:
- cups_conf = '/etc/cups/cupsd.conf'
+ cups_conf = '${SYSCONFDIR}/cups/cupsd.conf'
try:
f = file(cups_conf, 'r')
@@ -373,11 +373,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:
@@ -495,18 +490,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:
@@ -620,7 +615,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)
@@ -722,11 +717,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
@@ -738,7 +733,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'..."))