View Single Post
  #1   (View Single Post)  
Old 22nd November 2016
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,507
Default Reprovisioned Network and lpr printing no longer works

In keeping with my 2 steps forward and 1 step back, I reprovisioned my network from 192.168.1.1 to 192.168.2.1 (My new ADSLmodem has a fixed IP of 192.168.1.1).

My main workstation has as static IP with ifconfig re0 egress
Code:
re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1492
        lladdr 00:e0:4d:74:59:44
        index 1 priority 0 llprio 3
        groups: egress
        media: Ethernet 100baseTX full-duplex (100baseTX full-duplex,rxpause,txpause)
        status: active
        inet 192.168.2.3 netmask 0xffffff00 broadcast 192.168.2.255
.

In my printer web interface I have configured a Static IP of 192.168.2.2 with gateway of 192.168.2.1.

My main workstation dual boots and with Debian/Cups, I can print fine in Debian/Cups using socket://192.168.2.2:9100 and the same ppd that I use in my foomatic-rip filter in OpenBSD.

Booting into OpenBSD I can ping 192.168.2.2 succesfully. I know it is the right device as turning off the printer results in all packets lost.

My configuration files:
Code:
PooBear$ cat /etc/hosts
127.0.0.1       localhost
::1             localhost
192.168.2.1     Shepnet.home.yak Shepnet
192.168.2.2     Brother.home.yak Brother
192.168.2.3     PooBear.home.yak PooBear

PooBear$ cat /etc/printcap
#       $OpenBSD: printcap,v 1.1 2014/07/12 03:52:39 deraadt Exp $

# Default Network printer US letter
lp:\
    :lp=9100@Brother.home.yak:\
    :if=/usr/local/libexec/br_script:\
    :sd=/var/spool/output/lpd:\
    :lf=/var/log/lpd-errs:\
    :mx#0:\
    :sh:
# Same Network printer Duplex
duplex:\
    :lp=9100@Brother.home.yak:\
    :if=/usr/local/libexec/br_script_duplex:\
    :sd=/var/spool/output/lpd-duplex:\
    :lf=/var/log/lpd-errs:\
    :mx#0:\
    :sh:
#
# Same Network printer High Resolution
hires:\
    :lp=9100@Brother.home.yak:\
    :if=/usr/local/libexec/br_script_hires:\
    :sd=/var/spool/output/lpd-hires:\
    :lf=/var/log/lpd-errs:\
    :mx#0:\
    :sh:
#
# Same Network printer #10 envelope landscape
env10:\
    :lp=9100@Brother.home.yak:\
    :if=/usr/local/libexec/br_script_env10:\
    :sd=/var/spool/output/lpd-env10:\
    :lf=/var/log/lpd-errs:\
    :mx#0:\
    :sh:

PooBear$ ls -al /var/spool/output
total 24
drwxr-xr-x  6 root  wheel   512 Nov 13 19:16 .
drwxr-xr-x  9 root  wheel   512 Oct 29 14:59 ..
drwxrwxr-x  2 root  daemon  512 Nov 21 16:13 lpd
drwxrwxr-x  2 root  daemon  512 Nov 21 13:17 lpd-duplex
drwxrwxr-x  2 root  daemon  512 Nov 21 13:19 lpd-env10
drwxrwxr-x  2 root  daemon  512 Nov 21 13:41 lpd-hires

PooBear$ ls -al /var/spool/output/lpd
total 12
drwxrwxr-x  2 root    daemon  512 Nov 21 16:13 .
drwxr-xr-x  6 root    wheel   512 Nov 13 19:16 ..
-rw-rw---x  1 daemon  daemon    4 Nov 21 16:13 .seq
-rw-r--r--  1 root    daemon    0 Nov 13 19:11 lock
-rw-r--r--  1 root    daemon    0 Nov 13 19:12 status

PooBear$ cat /usr/local/libexec/br_script
#!/bin/sh

/usr/local/bin/foomatic-rip -ppd \
 /etc/foomatic/direct/brother-hl5450DN.ppd \
 -o PageSize=Letter
When I issue a print command the job goes into the queue and sits.
I get a warning that no daemon is present which my searches indicated is an "unconnected printer".

Code:
PooBear$ a2ps baby_back_ribs.txt                                               
[baby_back_ribs.txt (plain): 1 page on 1 sheet]
[Total: 1 page on 1 sheet] sent to the default printer
[12 lines wrapped]
PooBear$ lpq
Warning: no daemon present
Rank   Owner      Job  Files                                 Total Size
1st    jsh        8    (standard input)                      16065 bytes
PooBear$ lprm -
dfA008PooBear.home.yak dequeued
cfA008PooBear.home.yak dequeued
Although I could use cups, I'm happy with simple things that work and would like to know where I've gone wrong.

Last edited by shep; 22nd November 2016 at 12:51 AM. Reason: punctuation
Reply With Quote