Bug 56453 - printconf-backend fails to create printer when the lpd-spool-directory does not exhist
Summary: printconf-backend fails to create printer when the lpd-spool-directory does n...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: printconf
Version: 7.1
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Crutcher Dunnavant
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-11-19 00:58 UTC by Need Real Name
Modified: 2007-04-18 16:38 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2001-11-19 00:58:50 UTC
Embargoed:


Attachments (Terms of Use)

Description Need Real Name 2001-11-19 00:58:44 UTC
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
(lpd_spool_dir)):
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 
help
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 
help
# This function is a wrapper to make it easier to print out the names of 
intern
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 
destr
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 
help
        # Write out the printcap string
        printcap = open("/etc/printcap",'w')
        printcap_local = open("/etc/printcap.local", 'r')
        printcap.write(printcap_header)
        printcap.write(string.join(printcap_entry_list))
        printcap.write(printcap_local_preamble)
        printcap.write(printcap_local.read())  
        printcap.close()
        printcap_local.close()

        # 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
(lpd_s
                if os.path.exists("%s/VOLATILE" % dir):
                        try:
                                active_queue_dirs.index(os.path.basename
(dir))
                        except:
                                # Yeah, I could do this in python, but it 
would
                                os.system("rm -rf %s" % dir)


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


How reproducible:
Always

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

Additional info:

Comment 1 Crutcher Dunnavant 2001-11-26 16:53:04 UTC
create the lpd spool directory.


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