Bug 213683

Summary: /etc/rc.d/init.d/smartd "unary operator expected" error
Product: [Fedora] Fedora Reporter: Kevin Layer <redhat-bugzilla>
Component: smartmontoolsAssignee: Tomas Mraz <tmraz>
Status: CLOSED RAWHIDE QA Contact:
Severity: low Docs Contact:
Priority: medium    
Version: 6   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: smartmontools-5.36-4.fc7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-11-07 12:49:52 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 Kevin Layer 2006-11-02 15:42:04 UTC
If I change /etc/smartd.conf and remove the auto-generated marker so
my changes do not get clobbered, I get an error when the init script
is run:

/etc/rc.d/init.d/smartd: line 40: [: ==: unary operator expected

This change fixes the problem:

&& [ "$GEN_CONF" == "*SMARTD*AUTOGENERATED*" ] \

to

&& [ $GEN_CONF == "*SMARTD*AUTOGENERATED*" ] \

Comment 1 Tomas Mraz 2006-11-02 15:49:44 UTC
If you remove just the marker and leave the /etc/smartd.conf there or if you
remove the whole line as the comment below says it will work fine. -> Severity
Low. But I agree it should be eventually fixed.