Usenet comp.unix.tru64 (2000-2013)
 help / color / mirror / Atom feed
* running a runlevel-3 service as ordinary user at boot-time: what's wrong?
@ 2003-10-02 12:52 devnull
  2003-10-02 17:25 ` Peter da Silva
  0 siblings, 1 reply; 2+ messages in thread
From: devnull @ 2003-10-02 12:52 UTC (permalink / raw)


hi,

i'm using tru64 v5.1 and i'm trying to execute a certain script running at
boot with an ordinary user identity ("user" from now on).

what i'm doing is trying to write a script ("rc3script") into /sbin/init.d
containing something like

su - user -c '$USERVARIABLECONTAININGAPATH/userscript.sh &'

when invoked with start as first parameter (yes it should be "forked").


the script itself is owned by bin:bin and with r and x flags on for user and
group (and user writable).

the script is running without a problem when launched interactively by the
shell.


i created a symlink in /sbin/rc3.d called S99rc3script pointing at rc3script
(absolute path)

no matter what  i try, the script seems to not activate at boot (the system
goes to runlevel 3 of course)


what i forgot?

thank you for any suggestion you have, and for bearing my horrible english
;-)

devnull.





^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: running a runlevel-3 service as ordinary user at boot-time: what's wrong?
  2003-10-02 12:52 running a runlevel-3 service as ordinary user at boot-time: what's wrong? devnull
@ 2003-10-02 17:25 ` Peter da Silva
  0 siblings, 0 replies; 2+ messages in thread
From: Peter da Silva @ 2003-10-02 17:25 UTC (permalink / raw)


In article <DcVeb.3580$vO5.111800@twister1.libero.it>,
devnull <devnull@indirizzo.fasullo.it> wrote:
> what i'm doing is trying to write a script ("rc3script") into /sbin/init.d
> containing something like
> 
> su - user -c '$USERVARIABLECONTAININGAPATH/userscript.sh &'
> 
> when invoked with start as first parameter (yes it should be "forked").

First I'd make sure that it printed something at boot time outside of
this inner script:

echo "Starting userscript.sh as user from $USERVARIABLECONTAININGAPATH" \
	> /dev/console
su - user -c '$USERVARIABLECONTAININGAPATH/userscript.sh &'

That way you can see whether it's actually *trying* to run the script and
what it's running it as.

Also, you should call it like this:

nohup su - user -c 'whatever' < /dev/null > /dev/null 2>&1

Just to isolate it from potential signal problems.

-- 
I've seen things you people can't imagine. Chimneysweeps on fire over the roofs
of London. I've watched kite-strings glitter in the sun at Hyde Park Gate.  All
these things will be lost in time, like chalk-paintings in the rain.   `-_-'
Time for your nap.  | Peter da Silva | Har du kramat din varg, idag?    'U`


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-10-02 17:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-02 12:52 running a runlevel-3 service as ordinary user at boot-time: what's wrong? devnull
2003-10-02 17:25 ` Peter da Silva

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox