[Pkg-sysvinit-commits] r1452 - in sysvinit-upstream/trunk: doc src

Petter Reinholdtsen pere at alioth.debian.org
Sun Jul 12 15:06:21 UTC 2009


Author: pere
Date: 2009-07-12 15:06:19 +0000 (Sun, 12 Jul 2009)
New Revision: 1452

Modified:
   sysvinit-upstream/trunk/doc/Changelog
   sysvinit-upstream/trunk/src/halt.c
Log:
Change reboot/halt to work properly when used as a login shell.
Patch by Dale R. Worley and Fedora.


Modified: sysvinit-upstream/trunk/doc/Changelog
===================================================================
--- sysvinit-upstream/trunk/doc/Changelog	2009-07-12 15:03:07 UTC (rev 1451)
+++ sysvinit-upstream/trunk/doc/Changelog	2009-07-12 15:06:19 UTC (rev 1452)
@@ -79,6 +79,8 @@
     Modderman.
   * Change shutdown to only accept flags -H and -P with the -h flag,
     and document this requirement in the manual page.
+  * Change reboot/halt to work properly when used as a login shell.
+    Patch by Dale R. Worley and Fedora.
 
  -- Petter Reinholdtsen <pere at debian.org>  Fri, 30 Jul 2004 14:14:58 +0200
 

Modified: sysvinit-upstream/trunk/src/halt.c
===================================================================
--- sysvinit-upstream/trunk/src/halt.c	2009-07-12 15:03:07 UTC (rev 1451)
+++ sysvinit-upstream/trunk/src/halt.c	2009-07-12 15:06:19 UTC (rev 1452)
@@ -178,6 +178,8 @@
 	/*
 	 *	Find out who we are
 	 */
+	/* Remove dash passed on in argv[0] when used as login shell. */
+	if (argv[0][0] == '-') argv[0]++;
 	if ((progname = strrchr(argv[0], '/')) != NULL)
 		progname++;
 	else




More information about the Pkg-sysvinit-commits mailing list