From owner-freebsd-bugs Thu Jan 24 1:30: 8 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 8592237B402 for ; Thu, 24 Jan 2002 01:30:01 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g0O9U1j20217; Thu, 24 Jan 2002 01:30:01 -0800 (PST) (envelope-from gnats) Date: Thu, 24 Jan 2002 01:30:01 -0800 (PST) Message-Id: <200201240930.g0O9U1j20217@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Ruslan Ermilov Subject: Re: conf/34109: /etc/rc.shutdown isn't run on halt(8) Reply-To: Ruslan Ermilov Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR conf/34109; it has been noted by GNATS. From: Ruslan Ermilov To: "Crist J. Clark" 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" > To: Peter Pentchev > 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