Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 586966 - Sample update script has syntax errors
Sample update script has syntax errors
Status: CLOSED CURRENTRELEASE
Product: 389
Classification: Retired
Component: Directory Server (Show other bugs)
1.2.6
All Linux
low Severity medium
: ---
: ---
Assigned To: Rich Megginson
Viktor Ashirov
:
Depends On:
Blocks: 389_1.2.7 639035
  Show dependency treegraph
 
Reported: 2010-04-28 11:08 EDT by Rob Crittenden
Modified: 2015-12-07 11:56 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-12-07 11:56:36 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)
git patch file (master) (1.12 KB, patch)
2010-09-15 20:13 EDT, Noriko Hosoi
nhosoi: review?
nhosoi: review?
rmeggins: review+
Details | Diff

  None (edit)
Description Rob Crittenden 2010-04-28 11:08:53 EDT
Description of problem:

Update example shell script uses perl syntax, not shell syntax:

$ sh /usr/share/dirsrv/updates/exampleupdate.sh 
/usr/share/dirsrv/updates/exampleupdate.sh: line 41: my: command not found
/usr/share/dirsrv/updates/exampleupdate.sh: line 42: my: command not found
/usr/share/dirsrv/updates/exampleupdate.sh: line 43: my: command not found
/usr/share/dirsrv/updates/exampleupdate.sh: line 44: my: command not found
/usr/share/dirsrv/updates/exampleupdate.sh: line 45: my: command not found

Version-Release number of selected component (if applicable):

389-ds-base-1.2.6-0.3.a3.fc12.x86_64
Comment 2 Noriko Hosoi 2010-09-15 20:13:32 EDT
Created attachment 447594 [details]
git patch file (master)

Description: replacing the perl syntax with the corresponding shell syntax.

sh -x /usr/share/dirsrv/updates/exampleupdate.sh
+ PRE_STAGE=pre
+ PREINST_STAGE=preinst
+ RUNINST_STAGE=runinst
+ POSTINST_STAGE=postinst
+ POST_STAGE=post
+ '[' '' '!=' pre ']'
+ exit 0
Comment 3 Noriko Hosoi 2010-10-12 13:23:56 EDT
Reviewed by Rich one month ago (Thanks! :).

Pushed to master.

$ git merge work
Updating 310c056..501cce2
Fast-forward
 ldap/admin/src/scripts/exampleupdate.sh |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

$ git push
Counting objects: 13, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (6/6), done.
Writing objects: 100% (7/7), 699 bytes, done.
Total 7 (delta 5), reused 0 (delta 0)
To ssh://git.fedorahosted.org/git/389/ds.git
   310c056..501cce2  master -> master
Comment 4 Noriko Hosoi 2011-07-26 20:41:26 EDT
Steps to verify.
Install the server.
Run the following test script.
# sh -x /usr/share/dirsrv/updates/exampleupdate.sh
+ PRE_STAGE=pre
+ PREINST_STAGE=preinst
+ RUNINST_STAGE=runinst
+ POSTINST_STAGE=postinst
+ POST_STAGE=post
+ '[' '' '!=' pre ']'
+ exit 0

If no syntax errors are issued, this bug is verified.
Comment 5 Amita Sharma 2011-08-01 08:23:06 EDT
[root@rhel61 slapd-rhel61]# sh -x /usr/share/dirsrv/updates/exampleupdate.sh
+ PRE_STAGE=pre
+ PREINST_STAGE=preinst
+ RUNINST_STAGE=runinst
+ POSTINST_STAGE=postinst
+ POST_STAGE=post
+ '[' '' '!=' pre ']'
+ exit 0

thx Noriko, the bug is verified.

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