Bug 241271 - bind-chroot-admin: line 224: [: : unary operator expected
bind-chroot-admin: line 224: [: : unary operator expected
Status: CLOSED DUPLICATE of bug 241103
Product: Fedora
Classification: Fedora
Component: bind (Show other bugs)
6
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Adam Tkac
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-05-24 14:02 EDT by Sjoerd Mullender
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-24 14:49:16 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Sjoerd Mullender 2007-05-24 14:02:00 EDT
Description of problem:

During the upgrade from caching-nameserver-9.3.4-4.fc6 to
caching-nameserver-9.3.4-5.fc6 in the same transaction in which bind-9.3.4-4.fc6
was upgraded to bind-9.3.4-5.fc6 I got this error on some (but not all) systems
I upgraded:

  Updating  : caching-nameserver           ####################### [ 5/20] 
/usr/sbin/bind-chroot-admin: line 224: [: : unary operator expected
  Updating  : bind-utils                   ####################### [ 6/20] 

Looking at the code on the mentioned line, I don't quite get why it gives the
error.  When I run `bash -x /usr/sbin/bind-chroot-admin -s' I see this happening:
+ '[' '' = ']'
/usr/sbin/bind-chroot-admin: line 224: [: : unary operator expected

The relevant line in the script is
    if [ "$ENABLE_ZONE_WRITE" =  [yY1]* ]; then

I don't quite understand how bash can create the command [ '' = ] from this
line, however, there is definitely something wrong with the line.  The bit
[yY1]* should be quoted in case there are files in the directory starting with
any of the characters y, Y, or 1.

One difference between the systems which exhibit the problem and the one that
does not, is that the one that does not runs with SELINUX=permissive and the two
that do run with SELINUX=disabled.

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


How reproducible:
On the affected machines: 100% by running /usr/sbin/bind-chroot-admin -s.

Steps to Reproduce:
1. (Maybe) start system with selinux disabled
2. Run /usr/sbin/bind-chroot-admin -s
3.
  
Actual results:
/usr/sbin/bind-chroot-admin: line 224: [: : unary operator expected


Expected results:
Nothing.

Additional info:
Comment 1 Adam Tkac 2007-05-24 14:49:16 EDT

*** 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.