From: "Leonard, Roger" <rleonard () cvty ! com>
To: tru64-unix-managers
Subject: SUMMARY - rc scripts
Date: Mon, 22 Feb 1999 17:12:59 +0000 [thread overview]
Message-ID: <96079036515852.tru64-unix-managers.marc@archive.invalid> (raw)
I wrote:
> I am trying to get oracle and PeopleSoft to shutdown as part of the normal
> system shutdown and it does not appear to work. I created a script that
> calls the proper shutdowns and put it in /sbin/init.d and then created S
and
> K links in rc2.d and rc3.d. The startup in rc3.d works fine but the
system
> never executes the shutdown portion in rc2.d. Running it manually through
> the links and issuing the start or stop arguments works fine. When I do a
> shutdown -r now, the system immediately goes down and I can't see where it
> runs anything in rc2.d. What am I missing? Currently the way I got it to
> work was to put a wrapper script around the /sbin/shutdown executable that
> shuts down the applications and then calls the real shutdown but this
seems
> kludgy. Any help would be greatly appreciated.
>
Summary:
I guess I am the only one who didn't read the shutdown manpage. My
apologies. However I got some conflicting answers, some suggesting to put
the links in rc2, and rc0. It appears that Dr. Blinn summed it up when he
wrote:
What you have observed is the actual behavior of the "shutdown" command --
and
it's stated explicitly by the shutdown reference page, where it says:
Alternatively, if you invoke shutdown with the -r, -h, or -k flag, the
com-
mand executes the reboot command or the halt command, or avoids shutting
the system down. Note that the -h and -r flags use a broadcast kill
signal
and not the run level transition scripts. To use the run level transition
scripts, execute the shutdown command without the -h or -r flag. This
will
bring the system down to single user mode. From single user mode, execute
shutdown with the -h or -r flag. Alternatively, you can execute init 0
which will bring the system from level 3 to the console prompt.
My problem is I want to be able to do unattended reboots and it is not
feasible to shutdown to single user and then do an init. I created a
wrapper script that replaces and calls /sbin/shutdown that shuts down my
applications and I guess this will have to do. Not pretty, but it gets the
job done. Many thanks to the dozens of people who replied.
Roger Leonard
reply other threads:[~1999-02-22 17:12 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox