Bug 4305 - RedHat init script syntax error when /etc/sysconfig/network omits NETWORKING
RedHat init script syntax error when /etc/sysconfig/network omits NETWORKING
Status: NEW
Product: Samba 3.0
Classification: Unclassified
Component: Packaging
3.0.23c
All Linux
: P3 trivial
: none
Assigned To: Samba Bugzilla Account
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-12-21 16:26 UTC by Peter Lyons
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
no flags Details
Patch for smb.init on RHEL (408 bytes, patch)
2006-12-21 16:27 UTC, Peter Lyons
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Lyons 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 2006-12-21 16:26:39 UTC
Created attachment 2241 [details]
Patch for smb.init on RedHat-9
Comment 2 Peter Lyons 2006-12-21 16:27:02 UTC
Created attachment 2242 [details]
Patch for smb.init on RHEL