Date: Thu, 24 Jan 2002 01:30:01 -0800 (PST) From: Ruslan Ermilov <ru@FreeBSD.ORG> To: freebsd-bugs@FreeBSD.org Subject: Re: conf/34109: /etc/rc.shutdown isn't run on halt(8) Message-ID: <200201240930.g0O9U1j20217@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR conf/34109; it has been noted by GNATS. From: Ruslan Ermilov <ru@FreeBSD.ORG> To: "Crist J. Clark" <cjc@FreeBSD.ORG> Cc: bug-followup@FreeBSD.ORG Subject: Re: conf/34109: /etc/rc.shutdown isn't run on halt(8) Date: Thu, 24 Jan 2002 11:23:22 +0200 On Tue, Jan 22, 2002 at 12:10:01AM -0800, Crist J . Clark wrote: > The following reply was made to PR conf/34109; it has been noted by GNATS. > > From: "Crist J . Clark" <cjc@freebsd.org> > To: Peter Pentchev <roam@ringlet.net> > Cc: bug-followup@freebsd.org > Subject: Re: conf/34109: /etc/rc.shutdown isn't run on halt(8) > Date: Tue, 22 Jan 2002 00:01:33 -0800 > > On Mon, Jan 21, 2002 at 07:00:05AM -0800, Peter Pentchev wrote: > > On Mon, Jan 21, 2002 at 03:42:39PM +0100, clemensF wrote: > > > > Peter Pentchev: > > [snip] > > > > > Normally, the shutdown(8) utility is used when the system needs to be > > > > halted or restarted, giving users advance warning of their impending doom > > > > and cleanly terminating specific programs. > > > > > > > > Note the 'cleanly terminating specific programs' part :) > > > > > > do you suggest users do guesswork to find out if a clearly defined script > > > is run or not? i'd prefer "... and runs /etc/rc.shutdown to cleanly > > > terminate specific programs." > > > > shutdown(8) does not run /etc/rc.shutdown; init(8) does. > > All that shutdown(8) does is initiate a system shutdown. > > I think the code is all sound. However, the init(8) manpage is not > clear about when /etc/rc.shutdown is run. > I don't see a problem with documentation: : Init will terminate all possible processes (again, it will not wait for : deadlocked processes) and reboot the machine if sent the interrupt (INT) : signal, i.e. ``kill -INT 1''. This is useful for shutting the machine ^^^^^^^^^^^^^^^^^^^^ : down cleanly from inside the kernel or from X when the machine appears to ^^^^^ : be hung. : : Init will do the same, except it will halt the machine if sent the user ^^^^ : defined signal 1 (USR1), or will halt and turn the power off (if hardware ^^^^^^^^^^^^^^^^^^^^^^^^^^^ : permits) if sent the user defined signal 2 (USR2). : : When shutting down the machine, init will try to run the /etc/rc.shutdown ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ : script. This script can be used to cleanly terminate specific programs : such as innd (the InterNetNews server). The best thing we can do is to join the third paragraph with the first. Cheers, -- Ruslan Ermilov Oracle Developer/DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200201240930.g0O9U1j20217>