Operating System - HP-UX
1752780 Members
6386 Online
108789 Solutions
New Discussion

init.rc script fails because tty detach

 
Laurent Laperrousaz
Regular Advisor

init.rc script fails because tty detach

Hi,

we tried to set an init script to start an application on system boot using an init script (rc).

The process starts but is killed by the next inittab line: getty console.

I know there is a way to "demonize" the process and then detach it from the console but I can't remember
what is the means.
I tried to "nohup" the script but it fails to detach the process from console

help needed!
thanx
Laurent

PS here is my inittab file:

init:3:initdefault:
ioin::sysinit:/sbin/ioinitrc >/dev/console 2>&1
tape::sysinit:/sbin/mtinit > /dev/console 2>&1
muxi::sysinit:/sbin/dasetup /dev/console 2>&1 # mux init
stty::sysinit:/sbin/stty 9600 clocal icanon echo opost onlcr ixon icrnl ignpar brc1::bootwait:/sbin/bcheckrc /dev/console 2>&1 # fsck, etc.
link::wait:/sbin/sh -c "/sbin/rm -f /dev/syscon; /sbin/ln /dev/systty /dev/syscon" >/dev/console 2>&1
cprt::bootwait:/sbin/cat /etc/copyright >/dev/syscon # legal req
sqnc::wait:/sbin/rc /dev/console 2>&1 # system init
#powf::powerwait:/sbin/powerfail >/dev/console 2>&1 # powerfail
cons:123456:respawn:/usr/sbin/getty console console # system console
#ttp1:234:respawn:/usr/sbin/getty -h tty0p1 9600
#ttp2:234:respawn:/usr/sbin/getty -h tty0p2 9600
#ttp3:234:respawn:/usr/sbin/getty -h tty0p3 9600
#ttp4:234:respawn:/usr/sbin/getty -h tty0p4 9600
#ttp5:234:respawn:/usr/sbin/getty -h tty0p5 9600
ems1::bootwait:/sbin/rm -f /etc/opt/resmon/persistence/runlevel4_flag
ems2::bootwait:/sbin/cat /etc/opt/resmon/persistence/reboot_flag
ems3:3456:wait:/usr/bin/touch /etc/opt/resmon/persistence/runlevel4_flag
ems4:3456:respawn:/etc/opt/resmon/lbin/p_client
#ups::respawn:rtprio 0 /usr/lbin/ups_mond -f /etc/ups_conf