DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 22nd November 2016
shep shep is offline
Rc.conf Instructor
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 953
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
  #2   (View Single Post)  
Old 22nd November 2016
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 5,520
Default

You can ping the printer's IP address. But you are using a host name in your printcap(5) file. Does Brother.home.yak resolve to that address? If you haven't tested it, test it. if it fails, look to your resolv.conf(5) configuration.
Reply With Quote
  #3   (View Single Post)  
Old 22nd November 2016
shep shep is offline
Rc.conf Instructor
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 953
Default

I figured it out - the lock and status files needed to have daemon:daemon owner:group
Code:
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

changed to 
total 20
drwxrwxr-x  2 root    daemon  512 Nov 21 17:15 .
drwxr-xr-x  6 root    wheel   512 Nov 13 19:16 ..
-rw-rw---x  1 daemon  daemon    4 Nov 21 17:15 .seq
-rw-r-----  1 daemon  daemon   29 Nov 21 17:15 lock
-rw-rw----  1 daemon  daemon   38 Nov 21 17:15 status
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Network Printing, no output or errors from "lpr 'filename' spacebar_permissions OpenBSD General 15 29th January 2016 08:13 PM
4.8 = daemontools no longer works cacko OpenBSD General 4 27th November 2010 07:18 PM
my radeon hd card is no longer working iacbsd OpenBSD General 8 17th July 2009 10:14 AM
Username longer than 16 characters _hmp_ FreeBSD General 5 13th January 2009 10:01 AM
Network connection works fine, and then... snes-addict OpenBSD General 8 20th October 2008 11:13 PM


All times are GMT. The time now is 04:57 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick