Bug 241502 - /usr/sbin/bind-chroot-admin: line 224: [: : unary operator expected
/usr/sbin/bind-chroot-admin: line 224: [: : unary operator expected
Status: CLOSED DUPLICATE of bug 241103
Product: Fedora
Classification: Fedora
Component: bind (Show other bugs)
6
All Linux
medium Severity medium
: ---
: ---
Assigned To: Adam Tkac
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-05-26 17:37 EDT by Axel Thimm
Modified: 2013-04-30 19:35 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-05-28 08:37:56 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Axel Thimm 2007-05-26 17:37:22 EDT
Description of problem:
Upgrading to latest bind subpackages yields this error in two subpackages

Version-Release number of selected component (if applicable):
9.3.4-5.fc6

How reproducible:
always

Steps to Reproduce:
1.upgrade to latest bind packages
2.
3.
  
Actual results:
  36:Installing caching-names.. ######################################## [ 90%]
/usr/sbin/bind-chroot-admin: line 224: [: : unary operator expected            
Stopping named: [  OK  ]
Starting named: [  OK  ]
  38:Installing bind-chroot     ######################################## [ 95%]
Output from bind-chroot-31:9.3.4-5.fc6@x86_64:                                 
/usr/sbin/bind-chroot-admin: line 224: [: : unary operator expected            


Expected results:
No errors in scripts

Additional info:
    223     . /etc/sysconfig/named
    224     if [ "$ENABLE_ZONE_WRITE" =  [yY1]* ]; then
    225         return 0;
    226     fi;

The comaprison is bogus, it assumes that test's equality operation applies a
globbing expression matching, while in reality it globs on files matching [yY1]*
in the current folder.

I you want to do such kind of a testing try (untested)

> if echo "$ENABLE_ZONE_WRITE" | grep -E '^[yY1]' > /dev/null; then
Comment 1 Adam Tkac 2007-05-28 08:37:56 EDT
Fix is also avaliable on http://people.redhat.com/atkac/bind/

Regards, Adam

*** This bug has been marked as a duplicate of 241103 ***

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