Bug 56453 - printconf-backend fails to create printer when the lpd-spool-directory does not exhist
printconf-backend fails to create printer when the lpd-spool-directory does n...
Product: Red Hat Linux
Classification: Retired
Component: printconf (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Crutcher Dunnavant
Ben Levenson
Depends On:
  Show dependency treegraph
Reported: 2001-11-18 19:58 EST by Need Real Name
Modified: 2007-04-18 12:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-11-18 19:58:50 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Need Real Name 2001-11-18 19:58:44 EST
Last login: Sun Nov 18 17:15:09 2001
[root@daddy /root]# printconf-gui 
Traceback (innermost last):
  File "/usr/sbin/printconf-backend", line 381, in ?
    for i in range(flags.getNumChildren()):
  File "/usr/sbin/printconf-backend", line 625, in rebuild_queues
    for dir in map(lambda x: "%s/%s" % (lpd_spool_dir, x), os.listdir
OSError: [Errno 2] No such file or directory

[root@daddy /root]# joe printconf-backend

** Joe's Own Editor v2.8 ** Copyright (C) 1995 Joseph H. Allen **
File printconf-backend not changed so no update needed.
[root@daddy /root]# print
printafm           printconf-gui      printf             printtool
printconf-backend  printenv           printmail          printversion
[root@daddy /root]# printconf-
printconf-backend  printconf-gui      
[root@daddy /root]# joe printconf-backend 
Processing '/etc/joe/joerc'...done
    IW   printconf-backend            Row 1    Col 1    5:36  Ctrl-K H for 
New File

Line 625 of printconf-backend  add line to makedir....   If it is a new 
system /usr/spool/lpd does not exhist!!! this breaks printconf

** Joe's Own Editor v2.8 ** Copyright (C) 1995 Joseph H. Allen **
File printconf-backend not changed so no update needed.
[root@daddy /root]# whereis printconf-backend 
printconf-backend: /usr/sbin/printconf-backend
[root@daddy /root]# joe /usr/sbin/printconf-backend
Processing '/etc/joe/joerc'...done
    IW   /usr/sbin/printconf-backend  Row 107  Col 32   5:38  Ctrl-K H for 
# This function is a wrapper to make it easier to print out the names of 
def called(func):
        debug_print('Called : %s()' % func.__name__)

# Program Data Paths
# ------------------
# We need to know where some variable things are.
printconf_dir = "/usr/share/printconf"
foomatic_dir = printconf_dir + '/data'
lpd_spool_dir = "/var/spool/lpd"

# File Headers
# ------------
# The volatile file is a marker left in a spool directory saying, in 
effect, 'I
# printconf finds this file in a directory it cannot account for, it will 
volatile_header = """THIS DIRECTORY IS VOLATILE!!!

This directory was created by printconf for a printconf spool.
If printconf-backend does a spool rebuild, and finds volatile
File /usr/sbin/printconf-backend not changed so no update needed.
[root@daddy /root]# mkdir /var/spool/lpd
[root@daddy /root]# printconf-gui 
[root@daddy /root]# lpr /etc/inittab
[root@daddy /root]# joe /usr/sbin/printconf-backend
Processing '/etc/joe/joerc'...done
    IW   /usr/sbin/printconf-backend  Row 627  Col 1    5:44  Ctrl-K H for 
        # Write out the printcap string
        printcap = open("/etc/printcap",'w')
        printcap_local = open("/etc/printcap.local", 'r')

        # This scans the spool directory, and distroys any directory 
marked vol
        # valid configuration.
        # PUT (mkdir lpd_spool_dir) LINE HERE!!!!

        for dir in map(lambda x: "%s/%s" % (lpd_spool_dir, x), os.listdir
                if os.path.exists("%s/VOLATILE" % dir):
                                # Yeah, I could do this in python, but it 
                                os.system("rm -rf %s" % dir)

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.Brand new install no previous printer configuration.
2.Try to add and use a printer using printconf-gui,printconf-backend

Additional info:
Comment 1 Crutcher Dunnavant 2001-11-26 11:53:04 EST
create the lpd spool directory.

Note You need to log in before you can comment on or make changes to this bug.