Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 91724

Summary: `shutdown' option order is inconsistent [Also a feature request]
Product: Gentoo Linux Reporter: Prof. Jonathan King <squash>
Component: [OLD] UnspecifiedAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED FIXED    
Severity: enhancement    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Prof. Jonathan King 2005-05-06 11:59:30 UTC
The `shutdown' manpage shows

  SYNOPSIS
    /sbin/shutdown [-t sec] [-arkhncfF] time [warning-message]

whereas the cmd itself shows a different order:

  root> shutdown -k
  Usage:  shutdown [-akrhfnc] [-t secs] time [warning message]
  ...

Also for consistency: One uses "sec", the other "secs".

================================================================
A related feature request:  For a non-root user "tux",

  tux> shutdown -k
  shutdown: you must be root to do that!

So a non-root user can't use the cmd-line to safely find out how
to use `shutdown'.  I request that `shutdown' be modified so that
it allows a non-root user to see

  tux>  shutdown -k
  Usage:	  shutdown [-akrhfnc] [-t secs] time [warning message]
	      -a:      use /etc/shutdown.allow
	      -k:      don't really shutdown, only warn.
	      -r:      reboot after shutdown.
	      -h:      halt after shutdown.
	      -f:      do a 'fast' reboot (skip fsck).
	      -F:      Force fsck on reboot.
	      -n:      do not go through "init" but go down real fast.
	      -c:      cancel a running shutdown.
	      -t secs: delay between warning and kill signal.
	      ** the "time" argument is mandatory! (try "now") **

Also, would it be worthwhile to give `shutdown' an explicit "--help"
option?

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Jonathan Smith (RETIRED) gentoo-dev 2005-05-07 08:30:45 UTC
this is an upstream bug/feature-request (as far as i can tell)
Comment 2 SpanKY gentoo-dev 2005-05-09 19:58:06 UTC
fixed in portage and e-mailed upstream