Subject: bin/341: shutdown(8) -k man page inconsistancy
To: None <gnats-admin>
From: Luke Mewburn <lm@karybdis.cs.rmit.OZ.AU>
List: netbsd-bugs
Date: 07/16/1994 08:05:05
>Number:         341
>Category:       bin
>Synopsis:       maybe shutdown -k should leave /etc/nologin around?
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    gnats-admin (Utility Bug People)
>State:          open
>Class:          change-request
>Submitter-Id:   lm
>Arrival-Date:   Sat Jul 16 08:05:03 1994
>Originator:     Luke Mewburn
>Organization:
>Release:        
>Environment:
	
System: NetBSD karybdis 1.0-ALPHA NetBSD 1.0-ALPHA (KARYBDIS) #4: Sat Jul 16 11:49:14 EST 1994 root@karybdis:/Src/src/sys/arch/i386/compile/KARYBDIS i386


>Description:
To quote the manual from shutdown(8)
     -k   Kick every body off.  The -k option does not actually halt
	  the system, but leaves the system multi-user with logins
	  disabled (for all but super-user).
but infact, it doesn't do this, as it removes /etc/nologin just
before it exits. To be _really_ useful (IMHO), -k should leave the
/etc/nologin file around so you can fake the shutdown and temporarily
stop the users logging in without having to stuff around touching
/etc/nologin after shutdown -k completes.

>How-To-Repeat:
	% shutdown -k now
	then login from another tty as a normal user. You're not prevented
	from doing this as /etc/nologin doesn't exist.

>Fix:
either a) change sbin/shutdown.c so that the killflg test calls exit(0)
instead of finish(). E.g,

*-------*
*** shutdown.c.PLM	Sun Jul 17 00:54:10 1994
--- shutdown.c	Sun Jul 17 00:55:07 1994
***************
*** 316,322 ****
  	(void)printf("\r\nSystem shutdown time has arrived\007\007\r\n");
  	if (killflg) {
  		(void)printf("\rbut you'll have to do it yourself\r\n");
! 		finish();
  	}
  	if (dofast)
  		doitfast();
--- 316,324 ----
  	(void)printf("\r\nSystem shutdown time has arrived\007\007\r\n");
  	if (killflg) {
  		(void)printf("\rbut you'll have to do it yourself\r\n");
! 		(void)printf("\r(and don't forget to remove %s when done)\r\n",
! 			    _PATH_NOLOGIN);
! 		exit(0);
  	}
  	if (dofast)
  		doitfast();
*-------*

or b), change the manpage so that you don't delude the poor sysop
into a false sense of `user freeness' just when then want it :)

Luke.
>Audit-Trail:
>Unformatted:


------------------------------------------------------------------------------