You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by James liu <li...@gmail.com> on 2006/12/22 05:21:04 UTC

SolrDistribution is tested by FreeBSD?

i use fb 6.1

when i use
# sh rsyncd-enable

it show me:
cd: can't cd to rsyncd-enable/..
.: Can't open /usr/local/www/data/solr/example/solr/bin/bin/scripts-util: No
such file or directory




-- 
regards
jl

Re: SolrDistribution is tested by FreeBSD?

Posted by James liu <li...@gmail.com>.
u use linux?

2006/12/23, Yonik Seeley <yo...@apache.org>:
>
> On 12/23/06, James liu <li...@gmail.com> wrote:
> > i use absolute path and it show:
> >
> > test# sh bin/rsyncd-enable
> > [[: not found
> > function: not found
>
> The scripts were written for bash (the first line is #!/bin/bash)
> Do you have bash on your system?  If not, consider installing it.
>
> -Yonik
>



-- 
regards
jl

Re: SolrDistribution is tested by FreeBSD?

Posted by Chris Hostetter <ho...@fucit.org>.
: The scripts were written for bash (the first line is #!/bin/bash)
: Do you have bash on your system?  If not, consider installing it.


I just tried this out on the only FreeBSD system i have access to
(minotaur.apache.org) and found a few things...

1) /bin/bash doesn't exist
2) /bin/sh is true sh, not bash
3) bash is installed in /usr/local/bin/bash

...i'm not sure how standard these are among FreeBSD systems.

I also verified that rsyncd-enable and rsyncd-disable do work if you run
them explicitly through bash, but for some reason you must use the -u
option, and even then it logs a straing warning about scripts.conf...

hossman@minotaur$ bash solr/bin/rsyncd-enable -h
/home/hossman/tmp/apache-solr-1.1.0-incubating/example/solr/conf/scripts.conf:
l: command not found
solr/bin/rsyncd-enable: illegal option -- h
usage: rsyncd-enable [-u username] [-v]
       -u          specify user to sudo to before running script
       -v          increase verbosity
       -V          output debugging info

hossman@minotaur$ ls solr/logs/
hossman@minotaur$ bash solr/bin/rsyncd-enable
/home/hossman/tmp/apache-solr-1.1.0-incubating/example/solr/conf/scripts.conf: l: command not found
!udo: no passwd entry for
hossman@minotaur$ ls solr/logs/
hossman@minotaur$ bash solr/bin/rsyncd-enable -u hossman
/home/hossman/tmp/apache-solr-1.1.0-incubating/example/solr/conf/scripts.conf: l: command not found
hossman@minotaur$ ls solr/logs/
rsyncd-enabled  rsyncd.log


...so above and beyond the sh vs bash and patch issues .. there does seem
to be a compatibility issue.


-Hoss


Re: SolrDistribution is tested by FreeBSD?

Posted by Yonik Seeley <yo...@apache.org>.
On 12/23/06, James liu <li...@gmail.com> wrote:
> i use absolute path and it show:
>
> test# sh bin/rsyncd-enable
> [[: not found
> function: not found

The scripts were written for bash (the first line is #!/bin/bash)
Do you have bash on your system?  If not, consider installing it.

-Yonik

Re: SolrDistribution is tested by FreeBSD?

Posted by James liu <li...@gmail.com>.
i use absolute path and it show:

test# sh bin/rsyncd-enable
[[: not found
function: not found
[[: not found
[[: not found
[[: not found
function: not found
2006/12/22 16:18:49
function: not found
timeStamp: not found
/usr/local/www/data/solr/example/solr/bin/scripts-util: cannot create : No
such file or directory
[[: not found
fixUser: not found
logMessage: not found
logMessage: not found
[[: not found
touch: /usr/local/www/data/solr/example/solr/logs/rsyncd-enabled: No such
file or directory
logExit: not found


do i have to rewrite this shell?


-- 
regards
jl

Re: SolrDistribution is tested by FreeBSD?

Posted by Yonik Seeley <yo...@apache.org>.
On 12/21/06, James liu <li...@gmail.com> wrote:
> i use fb 6.1
>
> when i use
> # sh rsyncd-enable
>
> it show me:
> cd: can't cd to rsyncd-enable/..

Try executing it directly, or passing it's full path.
The current ${0%/*} trick to get the exe path only works if there is
more than one path element.

$ cat ttt
echo ${0%/*}
$ ./ttt
.
$ sh ttt
ttt
$ sh ./ttt
.
$ cd ..
$ sh yonik/ttt
yonik


-Yonik