diff --git a/doc/Changelog b/doc/Changelog index f609d2b..fa20fa5 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -12,6 +12,8 @@ sysvinit (2.88dsf) UNRELEASED; urgency=low * Change tty handling in init to make sure the UTF-8 flag is not cleared on boot. Patch from Samuel Thibault. * Add Makefile in toplevel directory. + * Print usage information when shutdown is used by non-root user. + Patch from Mike Frysinger and Gentoo. -- Petter Reinholdtsen Sun, 12 Jul 2009 19:58:10 +0200 diff --git a/src/shutdown.c b/src/shutdown.c index a950209..093a053 100644 --- a/src/shutdown.c +++ b/src/shutdown.c @@ -469,6 +469,7 @@ int main(int argc, char **argv) if (getuid() != 0) { fprintf(stderr, "shutdown: you must be root to do that!\n"); + usage(); exit(1); } strcpy(down_level, "1");