Phil,
At the end of rc.local, the workstation will switch from
runlevel 2, to runlevel 5 (or whatever is chosen in lts.conf).
My guess is when the rc.local script finishes, and the runlevel
changes, your background process is getting the HUP signal
and dying.
My suggestion is to try to catch the HUP signal with
something like this:
<snip>
(
trap "" 1
/bin/my-script &
)
<snip>
Notice the parenthesis (), that should cause the trap and
the script to run in a sub shell.
The 'trap "" 1' command is roughly what happens if you
use the nohup command.
Jim McQuillan
[EMAIL PROTECTED]
On Mon, 9 Sep 2002, Philip A. Roa wrote:
> Hi everyone,
>
> I'm having problems making custom made scripts run in the background.
>
> LTSP Kernel version: vmlinuz-2.4.9-ltsp-6
> LTSP workstations running at runlevel 3 (/opt/ltsp/i386/etc/lts.conf: RUNLEVEL = 3)
> Customized script entry line in /opt/ltsp/i386/etc/rc.local:
> <snip>
> /bin/my-script &
> <snip>
>
> -- my-script start
> #!/bin/bash
> echo "running my-script"
> while x=0 ; do sleep 15; done
> -- my-script end
>
> Upon booting, script is run but does not stay in the background (does not appear in
>ps)
>
> however, if i run my script manually from the LTSP workstation's bash prompt it runs
>perfectly in the
> background.
>
> ----- terminal session start ----
> bash-2.05# /bin/my-script &
> [1] 446
> bash-2.05# ps -x | grep 446
> 446 0 S /bin/sh /bin/my-script
> ----- terminal session end ----
>
> did i miss out something? any tips, suggestions, recommendations welcome.
>
> regards,
>
> phil
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by: OSDN - Tired of that same old
> cell phone? Get a new here for FREE!
> https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
> _____________________________________________________________________
> Ltsp-discuss mailing list. To un-subscribe, or change prefs, goto:
> https://lists.sourceforge.net/lists/listinfo/ltsp-discuss
> For additional LTSP help, try #ltsp channel on irc.openprojects.net
>
--
-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone? Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
_____________________________________________________________________
Ltsp-discuss mailing list. To un-subscribe, or change prefs, goto:
https://lists.sourceforge.net/lists/listinfo/ltsp-discuss
For additional LTSP help, try #ltsp channel on irc.openprojects.net