sudo in startup script
From: Pedro Pinto (ppinto_at_cs.cmu.edu)
Date: 08/29/04
- Previous message: Greg Hennessy: "Re: getting DWl-650 wlan card to work"
- Next in thread: +Alan Hicks+: "Re: sudo in startup script"
- Reply: +Alan Hicks+: "Re: sudo in startup script"
- Reply: Thomas Wolf: "Re: sudo in startup script"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 29 Aug 2004 16:10:57 GMT
Hi there,
I am tyring to install the perforce source control system on my new BSD
5.2.1. I want perforce to run under user perforce instead of root. I
would rather not use setuid. I have tried installing the following
script in /usr/local/etc/rc.d/p4.sh
#!/bin/sh
# start
if [ "x$1" = "x" -o "x$1" = "xstart" ]; then
sudo -u perforce -b /usr/local/p4/start-p4
# stop
elif [ "x$1" = "xstop" ]; then
killall p4d
fi
where start-p4 is a sh script that sets some env variables, sets umask
and then spawns perforce. This works fine if I run the script on the
command line but it does not work at startup. Some experimantion seems
to indicate that the culprit is sudo (i.e. I cannot start anything else
with sudo at startup and if I remove sudo from the above script
everything works).
Any ideas?
TIA,
-pp
- Previous message: Greg Hennessy: "Re: getting DWl-650 wlan card to work"
- Next in thread: +Alan Hicks+: "Re: sudo in startup script"
- Reply: +Alan Hicks+: "Re: sudo in startup script"
- Reply: Thomas Wolf: "Re: sudo in startup script"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|