Bug 56993

Summary: undefined function delim() in create_printcap
Product: [Retired] Red Hat Linux Reporter: Alexander Kanevskiy <kad>
Component: ypservAssignee: Florian La Roche <laroche>
Status: CLOSED RAWHIDE QA Contact: Aaron Brown <abrown>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.2   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-12-08 21:13:48 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Alexander Kanevskiy 2001-12-02 15:40:35 UTC
Description of Problem:
create_printcap not working.

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

How Reproducible:
[root@kadhome yp]# cat /etc/printcap
lp:\
        :sd=/var/spool/lpd/lp:\
        :mx#0:\
        :sh:\
        :rm=pylesos.asp-linux.com.ua:\
        :rp=lp:\
        :lpd_bounce=true:\
        :if=/var/spool/lpd/lp/filter:
[root@kadhome yp]# make printcap
Updating printcap...
awk: /usr/lib/yp/create_printcap:24: (FILENAME=- FNR=17) fatal: function 
`delim' not defined
failed to send 'clear' to local ypserv: RPC: Program not registered
[root@kadhome yp]#

Steps to Reproduce:

Actual Results:


Expected Results:

Additional Information:

Comment 1 Tony Kocurko 2001-12-06 12:58:22 UTC
In /var/lib/yp/create_printcap, change this string:

  "suffix = delim(++count[name])"

to this string:

  "suffix = delim (++count[name])"

Notice that in the version as supplied, the lack of a space between the variable
name "delim" and the expression "(++count[name])" causes gawk to treat the right
hand side as a function invocation rather than as a concatenation, as was
clearly intended by the author.

Cheers,
Tony Kocurko
Seismological Systems Manager
Department of Earth Sciences
Alexander Murray Building - Room ER-4063
Memorial University of Newfoundland
St. John's, Newfoundland
Canada    A1B 3X5


Comment 2 Florian La Roche 2001-12-08 21:13:43 UTC
Fixed in 2.2-2 or higher.

Thanks a lot for this good bug-report,

Florian La Roche