lucchina@hsi86.hsi.com (Paul Lucchina) (03/28/91)
How does one traverse init levels in an unattended mode? The OS is DG/UX 4.31 and the scripts I am trying to run do the following: 1 - bring the system down to init level 1 (run by cron) 2 - do level 0 dumps (a shell script located in /etc/rc1.d) 3 - bring the system up to init level 3 (another script in /etc/rc1.d) Steps 1 and 2 work, step 3 never happens the system remains at init level 1. Since step 3 is located in /etc/rc1.d the init level 1 scripts are not completed before an "/etc/telinit 3" is executed. How do I get to init level 3? -- Paul J. Lucchina E-MAIL - lucchina@hsi.com 3M Health Information Systems VOICE - (203) 949-0303 Wallingford, CT 06492 FAX - (203)949-6331
dmturne@PacBell.COM (Dave Turner) (03/29/91)
In article <3301@hsi86.hsi.com> lucchina@hsi86.hsi.com (Paul Lucchina) writes: >How does one traverse init levels in an unattended mode? The OS is DG/UX 4.31 >and the scripts I am trying to run do the following: > 1 - bring the system down to init level 1 (run by cron) > 2 - do level 0 dumps (a shell script located in /etc/rc1.d) > 3 - bring the system up to init level 3 (another script in /etc/rc1.d) >Steps 1 and 2 work, step 3 never happens the system remains at init >level 1. >Since step 3 is located in /etc/rc1.d the init level 1 scripts are not >completed before an "/etc/telinit 3" is executed. > >How do I get to init level 3? We use level 4 for this. In root's crontab: 30 1 * * 1 /etc/init 4 In /etc/inittab: i4a:4:wait:/etc/rc4 1> /dev/systty 2>&1 # kill off all processes i4b:4:wait:/letc/init4.fsck.dbu auto 1>/dev/systty 2>&1 # do fsck and dbu i4c:4:wait:/etc/init 3 # go back to multi-user The details in /letc/init4.fsck.dbu (disk back up) are left as an exercise for the reader. :-) -- Dave Turner 415/823-2001 {att,bellcore,sun,ames,decwrl}!pacbell!dmturne