summaryrefslogtreecommitdiff
path: root/usr.sbin/lpr/lprm
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1996-05-04 11:53:06 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1996-05-04 11:53:06 +0000
commit8a4b7d06ffbe850e5186e7994f245809c75d29f5 (patch)
tree430069999a3c8b72217ed4c5e2309b9808a809c5 /usr.sbin/lpr/lprm
parent41825ebcd1c1b1c101667efb51ab14027456d079 (diff)
correct -P, $PRINTER, and DEFLP interactions. bug reported by scott.burns@labatt.com
Diffstat (limited to 'usr.sbin/lpr/lprm')
-rw-r--r--usr.sbin/lpr/lprm/lprm.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.sbin/lpr/lprm/lprm.c b/usr.sbin/lpr/lprm/lprm.c
index df3a6cb3b04..88607c2083f 100644
--- a/usr.sbin/lpr/lprm/lprm.c
+++ b/usr.sbin/lpr/lprm/lprm.c
@@ -133,8 +133,13 @@ main(argc, argv)
}
}
}
- if (printer == NULL && (printer = getenv("PRINTER")) == NULL)
+ if (printer == NULL) {
+ char *p;
+
printer = DEFLP;
+ if ((p = getenv("PRINTER"))
+ printer = p;
+ }
rmjob();
exit(0);