Bug 241502 - /usr/sbin/bind-chroot-admin: line 224: [: : unary operator expected
Summary: /usr/sbin/bind-chroot-admin: line 224: [: : unary operator expected
Keywords:
Status: CLOSED DUPLICATE of bug 241103
Alias: None
Product: Fedora
Classification: Fedora
Component: bind
Version: 6
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Adam Tkac
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-05-26 21:37 UTC by Axel Thimm
Modified: 2013-04-30 23:35 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-05-28 12:37:56 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Axel Thimm 2007-05-26 21:37:22 UTC
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 12:37:56 UTC
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.