On Sun, Nov 10, 2002 at 09:46:54AM -0800, Micheas Herman wrote:
FreeBSD's su command does not accept commands.
From FreeBSD 4.4's su(8): SYNOPSIS su [-] [-Kflm] [-c class] [login [args]] ... If the optional args are provided on the command line, they are passed to the login shell of the target login.
Here is a patch. That works with FreeBSD 4.5 Release and Debian SID.
? z3950-daemon-launch.sh.diff Index: z3950-daemon-launch.sh =================================================================== RCS file: /cvsroot/koha/koha/acqui.simple/z3950-daemon-launch.sh,v retrieving revision 1.3 diff -r1.3 z3950-daemon-launch.sh 38c38,44 < su -s /bin/sh -c $KohaZ3950Shell - $RunAsUser & ---
if [ $(uname)=="FreeBSD" ] then setuidgid $RunAsUser $KohaZ3950Shell; else echo su -s /bin/sh -c $KohaZ3950Shell - $RunAsUser &; fi;
FreeBSD 4.4 doesn't have a 'setuidgid' command. Nor do most other Unixes. However su $RunAsUser -c $KohaZ3950Shell & works fine for me (and should work on other Unixes as well). -- Andrew Arensburger This message *does* represent the arensb@ooblick.com views of ooblick.com Any closet is a walk-in closet if you try hard enough.