Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!uwm.edu!linac!att!pacbell.com!pacbell!ptsfa!dmturne From: dmturne@PacBell.COM (Dave Turner) Newsgroups: comp.unix.wizards Subject: Re: system V init levels Keywords: sysV init levels Message-ID: <6088@ptsfa.PacBell.COM> Date: 29 Mar 91 00:17:01 GMT References: <3301@hsi86.hsi.com> Reply-To: dmturne@PacBell.COM (Dave Turner) Distribution: usa Organization: Pacific * Bell, San Ramon, CA Lines: 32 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