Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.

Bug 586966

Summary: Sample update script has syntax errors
Product: [Retired] 389 Reporter: Rob Crittenden <rcritten>
Component: Directory ServerAssignee: Rich Megginson <rmeggins>
Status: CLOSED CURRENTRELEASE QA Contact: Viktor Ashirov <vashirov>
Severity: medium Docs Contact:
Priority: low    
Version: 1.2.6CC: amsharma, jgalipea, nhosoi
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
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: ---
Bug Depends On:    
Bug Blocks: 576869, 639035    
Attachments:
Description Flags
git patch file (master) nhosoi: review?, nhosoi: review?, rmeggins: review+

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.