lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ken Prows (JIRA)" <>
Subject [jira] Commented: (SOLR-327) shell scripts failed to run on Solaris 8 (and probably other non recent UNIX)
Date Wed, 08 Aug 2007 20:46:59 GMT


Ken Prows commented on SOLR-327:

On Solaris 10 I also ran into a problem with the  date command. The -d option does not exist
for the Solaris version of date. This causes the snappuller script to fail. In order to fix
this, I made the below changes. Note that I made these changes off of the latest version from
trunk (revision 556910) since there were already some Solaris fixes there.


rsyncStart=`date +'%Y-%m-%d %H:%M:%S'`
startTimestamp=`date -d "$rsyncStart" +'%Y%m%d-%H%M%S'`
rsyncStartSec=`date -d "$rsyncStart" +'%s'`


rsyncStartSec=`perl -e 'print time'`
startTimestamp=`perl -MPOSIX -e 'print POSIX::strftime("%Y%m%d%H%M%S", localtime(time))'`


rsyncEnd=`date +'%Y-%m-%d %H:%M:%S'`
endTimestamp=`date -d "$rsyncEnd" +'%Y%m%d-%H%M%S'`
rsyncEndSec=`date -d "$rsyncEnd" +'%s'`


rsyncEndSec=`perl -e 'print time'`
endTimestamp=`perl -MPOSIX -e 'print POSIX::strftime("%Y%m%d%H%M%S", localtime(time))'`


As a side note, I'd like to see the  scripts converted from bash to perl for better portability.
If there is any interest in that, I'd like to help take that on.

> shell scripts failed to run on Solaris 8 (and probably other non recent UNIX)
> -----------------------------------------------------------------------------
>                 Key: SOLR-327
>                 URL:
>             Project: Solr
>          Issue Type: Bug
>            Reporter: Paul Sundling
>            Priority: Minor
> There are several places where commands used are incompatible with older UNIX versions,
even though these capabilities are present.  There are ways to rewrite the shell scripts to
be compatible with these older versions.
> The first example is the use of pgrep.  Older machines will have grep, egrep and fgrep,
but NOT pgrep. I've been doing UNIX for well over a decade and never heard of pgrep, although
it is installed on my home server apparently. :)
> There are also enhancements like the use of  'cp -l'.  This could be accomplished with
the 'ln' command instead on older UNIX versions.  Since it's also used recursively in snapshooter,
which 'ln' doesn't support, it makes the command more complex.  

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message