[S] DU Shutdown

From: Tom Webster <webster_at_ssdpdc.mdc.com>
Date: Mon, 21 Apr 1997 12:01:37 -0700

Hi,

Thanks to the alpha-managers that provided input:

Randy Hayman <haymanr_at_icefog.alaska.edu>
Richard Rogers <R.M.Rogers_at_staffs.ac.uk>
Barry Branch <barry_at_fiu.edu>
Marco <marco_at_gore.afep.cornell.edu>
Joseph C King <jking_at_chablis.cos.com>
Richard Renshaw <rrens_at_hcia.com>
Jim Backer <jbacker_at_cruzio.com>


Barry Branch <barry_at_fiu.edu> sent the following, about an hour after
I looked at the SysVinit stuff on one of my Linux boxes and muddled
through setting up a run level 6 for rebooting. Barry's solution is
a little cleaner than mine, so I'm posting his solution:

----- snip ----- snip ----- snip ----- snip ----- snip -----
What I do here is add a level 6 to DUnix. Like so:

In /etc/inittab add the following line after s0:
s6:6:wait:/sbin/rc0 reboot < /dev/console > /dev/console 2>&1

Then change /sbin/rc0 to look like (the changed lines are marked with an *):

if [ "$ARGONE" = shutdown ]; then
        /sbin/init S
*elif [ "$ARGONE" = reboot ]; then
* echo "The system is rebooting..."
* sync
* /sbin/reboot
else
        echo "The system is down."
        sync
        /sbin/halt -q
fi

Then you can do an init 6 and have your system reboot.
----- snip ----- snip ----- snip ----- snip ----- snip -----

The only things I might change would be to symlink the rc0 script
to the name rc6, it just seems a little cleaner that way.

I still need to see if I can build some type of a wrapper script
that can be used for scheduled timeouts, that will do all of the
nice things like broadcast shutdown messages to the users and
write the /etc/nologin file and such ('shutdown -k' will do the
broadcasts, but won't write the /etc/nologin file). If there
is interest, and I manage to get something workable written, I'll
post it to this list.

Here is my original question:
----- snip ----- snip ----- snip ----- snip ----- snip -----
This is more or less a follow-up question to Karen Thomas'
<kthomas_at_csunet.ctstateu.edu> question about shutting down oracle databases
automatically.

After seeing the summary, reading the man pages, and playing with the system
it appears that shutdown does nothing with the /sbin/rc0.d scripts.

My problem is that I have a system running Oracle (and some other services)
that is a fair distance away. If I do an "init 0" or an "init s", it will
take the system down to a non-networked mode. This means a good hike over to
the system to restart the system from the console. It also means that
automated reboots seem to be right out.

Before I spend a fair amount of time getting my head around the University
of Alaska's ua_shutdown wrapper script, is there a simpler way of shutting
down and rebooting the system? Something like the SysV init level 6, which
takes the system down to init 0 and reboots.

It's not that I don't appriciate Kurt Carlson <sxkac_at_alaska.edu> making
the UA_DUtools available. It is just that it will take a little bit of
time to understand them and shape them to my needs.
----- snip ----- snip ----- snip ----- snip ----- snip -----

Kurt's ua_shutdown script proved to be too tightly tied to UA's environment
to make for quick porting and it uses the POYLCENTER Scheduler (which we
don't have) for scheduling shutdowns.

A fair number of the respondants indicated that 'init 6' would
already reboot their systems. I have to belive that one of your
other SysAdmins or your VAR went in and set this up. On virgin
DU systems coming from DEC, there are only four run levels
(0,S,2,3).

Thanks again,

Tom
--
+--------------------------------+------------------------------+
| Tom Webster                    | "Funny, I've never seen it   |
| SysAdmin MDA-SSD ISS-IS-HB-S&O | do THAT before...."          |
| webster_at_ssdpdc.mdc.com         | - Any user support person    |
+--------------------------------+------------------------------+
|   Unless clearly stated otherwise, all opinions are my own.   |
+---------------------------------------------------------------+
Received on Mon Apr 21 1997 - 21:37:29 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:36 NZDT