2011/9/3 douglas barrett <dbarrettnj_at_netscape.net>:
>
>>> apache_at_X hooks]$ pwd
>>> Y/hooks
>>>
>>> [apache_at_X hooks]$ ls -l pre-revprop-change
>>> -rwxr-xr-x. 1 apache apache 2890 Sep 2 08:39
>>> pre-revprop-change << so I seem to have a valid hook
>>>
>>> [apache_at_irvine hooks]$ tail -14 pre-revprop-change
>>> REPOS="$1"
>>
>>
>>"tail" does not show the whole file. What happens if you try to run
>>this script? ( ./pre-revprop-change )
>>
>>Do you have shebang line ( #!/bin/sh ) at the top of the file
>>and does the shell mentioned there (/bin/sh or whatever) exist on your
>>server and is usable by that user?
>>
>
> Konstantin,
>
> thank you for taking the time to respond. You are right about tail of
> course. I used this command because my pre-revprop-change file was
> created from pre-revprop-change.tmpl which begins with copious comments
> which aren't germane.
>
> The file does in fact contain the opening magic number and interpreter
> path.
>
> [apache_at_X hooks]$ head -1 pre-revprop-change
> #!/bin/sh
>
> {
> As a side point the "shebang" is not required for a shell script
> to run.
>
> [apache_at_X tmp]$ echo "echo \$*" > ./Echo
> [apache_at_X tmp]$ cat ./Echo
> echo $*
> [apache_at_X tmp]$ chmod u+x ./Echo
> [apache_at_X tmp]$ ./Echo "you don't need a magic number"
> you don't need a magic number
> }
You are executing it from within a shell. I wonder whether it is also
true when executing it with C API,
> If I run the script it behaves as intended.
>
> [apache_at_X hooks]$ ls /tmp/tmp
> ls: cannot access /tmp/tmp: No such file or directory
> [apache_at_X hooks]$ ./pre-revprop-change
> [apache_at_X hooks]$ ls /tmp/tmp
> /tmp/tmp
Good.
And what is the value of its exit status ( echo "$?" IIRC )
At least "exit code 255" message means that subversion sees the file
and tries to start it. (I wonder why it is "255").
You may try to print something to ">&2" so that this failure wouldn't
be "with no output."
I wonder whether your installation of apache uses chroot to limit
access to file system.
You may try to use a C program instead of a script. There should be a
program named "true" in your system - you may try replacing the script
with a copy of that program.
Best regards,
Konstantin Kolinko
Received on 2011-09-03 02:09:16 CEST