SolrDistribution is tested by FreeBSD?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

SolrDistribution is tested by FreeBSD?

James liu-2
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
Reply | Threaded
Open this post in threaded view
|

Re: SolrDistribution is tested by FreeBSD?

Yonik Seeley-2
On 12/21/06, James liu <[hidden email]> 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
Reply | Threaded
Open this post in threaded view
|

Re: SolrDistribution is tested by FreeBSD?

James liu-2
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
Reply | Threaded
Open this post in threaded view
|

Re: SolrDistribution is tested by FreeBSD?

Yonik Seeley-2
On 12/23/06, James liu <[hidden email]> 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
Reply | Threaded
Open this post in threaded view
|

Re: SolrDistribution is tested by FreeBSD?

James liu-2
u use linux?

2006/12/23, Yonik Seeley <[hidden email]>:

>
> On 12/23/06, James liu <[hidden email]> 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
Reply | Threaded
Open this post in threaded view
|

Re: SolrDistribution is tested by FreeBSD?

Chris Hostetter-3
In reply to this post by Yonik Seeley-2

: 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