You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Pierre-Arnaud Marcelot (JIRA)" <ji...@apache.org> on 2009/06/08 09:14:07 UTC
[jira] Resolved: (DIRSERVER-1365) Modification on the current init
script (at least version 1.5.4) placed under /etc/init.d
[ https://issues.apache.org/jira/browse/DIRSERVER-1365?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pierre-Arnaud Marcelot resolved DIRSERVER-1365.
-----------------------------------------------
Resolution: Fixed
Patch applied at commit 782546.
http://svn.apache.org/viewvc?rev=782546&view=rev
Thanks Alex!
> Modification on the current init script (at least version 1.5.4) placed under /etc/init.d
> -----------------------------------------------------------------------------------------
>
> Key: DIRSERVER-1365
> URL: https://issues.apache.org/jira/browse/DIRSERVER-1365
> Project: Directory ApacheDS
> Issue Type: Bug
> Affects Versions: 1.5.4
> Environment: linux 2.6.29.2 (bluewhite64)
> Reporter: alex alvarez
> Assignee: Pierre-Arnaud Marcelot
> Priority: Minor
> Fix For: 1.5.5
>
>
> The current initialization script under /etc/init.d does not take into consideration when it's run from that directory using the "./" prefix.
> Currently, at least in version 1.5.4, starting on line 70, you have...
> case $0 in
> /*)
> SCRIPT="$0"
> ;;
> *)
> PWD=`pwd`
> SCRIPT="$PWD/$0"
> ;;
> esac
> , which assumes the script is started with its fully qualified name or as a single word, assuming you have `pwd` on your path.
> One possible solution is to have these lines replaced by the following...
> case $0 in
> /*)
> SCRIPT="$0"
> ;;
> ./*)
> SCRIPT="`pwd`/`echo $0 | sed -e 's/^[ ]*\.\///'`"
> ;;
> *)
> SCRIPT="`pwd`/`echo $0 | sed -e 's/^[ ]*//'`"
> ;;
> esac
> The PWD variable is not used anywhere else in the script, thus it's not really necessary. But more importantly, it now can work with the "./" prefix, and also clears spaces at the beginning of the line, if any.
> The following lines make up the patch file...
> 74,76c74,78
> < *)
> < PWD=`pwd`
> < SCRIPT="$PWD/$0"
> ---
> > ./*)
> > SCRIPT="`pwd`/`echo $0 | sed -e 's/^[ ]*\.\///'`"
> > ;;
> > *)
> > SCRIPT="`pwd`/`echo $0 | sed -e 's/^[ ]*//'`"
> 78a81
> > echo $SCRIPT
> Cheers, Alex Alvarez
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.