Bug 121704 - post-install script syntax error prevents loading
post-install script syntax error prevents loading
Status: CLOSED DUPLICATE of bug 121892
Product: Fedora
Classification: Fedora
Component: policy (Show other bugs)
rawhide
noarch Linux
medium Severity medium
: ---
: ---
Assigned To: Daniel Walsh
: SELinux
: 121685 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-04-26 09:37 EDT by Derek Poon
Modified: 2007-11-30 17:10 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-02-21 14:02:46 EST
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 Derek Poon 2004-04-26 09:37:15 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040422

Description of problem:
The policy.spec file contains a syntax error -- notice the double pair
of ampersands in the second command:

%post sources
if [ -x /usr/bin/selinuxenabled ]; then
   make -W /etc/security/selinux/src/policy/users \
        -C /etc/security/selinux/src/policy > /dev/null 2>&1
   /usr/bin/selinuxenabled &&  && [ -e /selinux/policyvers ] && \
      make -C /etc/security/selinux/src/policy load
fi
exit 0

Version-Release number of selected component (if applicable):
policy-sources-1.11.2-18

How reproducible:
Always

Steps to Reproduce:
rpm -Uvh policy-sources-1.11.2-18.noarch.rpm

Actual Results:  /var/tmp/rpm-tmp.93704: line 4: syntax error near
unexpected token `&&'
/var/tmp/rpm-tmp.93704: line 4: `   /usr/bin/selinuxenabled &&  && [
-e selinux/policyvers ] && \'
error: %post(policy-sources-1.11.2-18) scriptlet failed, exit status 2

Expected Results:  No error should have occurred.

Additional info:

The following changelog entry seems to be relevant:

* Thu Apr 22 2004 Dan Walsh <dwalsh@redhat.com> 1.11.2-18
- [...]
- Check if /selinux is mounted before reload
Comment 1 Aleksey Nogin 2004-04-26 17:31:39 EDT
*** Bug 121685 has been marked as a duplicate of this bug. ***
Comment 2 Ignacio Vazquez 2004-04-27 10:36:28 EDT
The bug is on line 126 of the spec file:

   /usr/bin/selinuxenabled &&  && [ -e /selinux/policyvers ] && \
Comment 3 Daniel Walsh 2004-04-28 15:27:26 EDT
Fixed in policy-1.11.2-20
Comment 4 Alexandre Oliva 2004-05-01 22:06:34 EDT

*** This bug has been marked as a duplicate of 121892 ***
Comment 5 Red Hat Bugzilla 2006-02-21 14:02:46 EST
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.

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