Bug 4305 - RedHat init script syntax error when /etc/sysconfig/network omits NETWORKING
Summary: RedHat init script syntax error when /etc/sysconfig/network omits NETWORKING
Status: NEW
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: Packaging (show other bugs)
Version: 3.0.23c
Hardware: All Linux
: P3 trivial
Target Milestone: none
Assignee: Samba Bugzilla Account
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-21 16:26 UTC by Peter Lyons (mail bounced back)
Modified: 2009-04-04 08:02 UTC (History)
0 users

See Also:


Attachments
Patch for smb.init on RedHat-9 (385 bytes, patch)
2006-12-21 16:26 UTC, Peter Lyons (mail bounced back)
no flags Details
Patch for smb.init on RHEL (408 bytes, patch)
2006-12-21 16:27 UTC, Peter Lyons (mail bounced back)
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Lyons (mail bounced back) 2006-12-21 16:26:10 UTC
The samba init scripts for RedHat-9 and RHEL can cause a shell invalid syntax error if the /etc/sysconfig/network configuration file fails to set the NETWORKING shell variable.  When this happens, the script will print this output:

/etc/init.d/smb: line 32: [: =: unary operator expected

Fundamentally, this is a misconfiguration of the OS configuration file /etc/sysconfig/network, but the fix is a trivial shell quoting fix.  I will attach a patch for RedHat-9 and one for RHEL.

To reproduce, edit /etc/sysconfig/network and remove or misspell the NETWORKING variable, then try to run /etc/init.d/smb start.
Comment 1 Peter Lyons (mail bounced back) 2006-12-21 16:26:39 UTC
Created attachment 2241 [details]
Patch for smb.init on RedHat-9
Comment 2 Peter Lyons (mail bounced back) 2006-12-21 16:27:02 UTC
Created attachment 2242 [details]
Patch for smb.init on RHEL