Bug 586966 - Sample update script has syntax errors
Summary: Sample update script has syntax errors
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: 389
Classification: Retired
Component: Directory Server
Version: 1.2.6
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Rich Megginson
QA Contact: Viktor Ashirov
URL:
Whiteboard:
Depends On:
Blocks: 389_1.2.7 639035
TreeView+ depends on / blocked
 
Reported: 2010-04-28 15:08 UTC by Rob Crittenden
Modified: 2015-12-07 16:56 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-12-07 16:56:36 UTC
Embargoed:


Attachments (Terms of Use)
git patch file (master) (1.12 KB, patch)
2010-09-16 00:13 UTC, Noriko Hosoi
nhosoi: review?
nhosoi: review?
rmeggins: review+
Details | Diff

Description Rob Crittenden 2010-04-28 15:08:53 UTC
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-16 00:13:32 UTC
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 17:23:56 UTC
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-27 00:41:26 UTC
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 12:23:06 UTC
[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.