Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37880945
en ru br
Репозитории ALT
5.1: 2.86-alt2
4.1: 2.86-alt2
4.0: 2.86-alt1
3.0: 2.85-alt8
www.altlinux.org/Changes

Группа :: Система/Настройка/Загрузка и инициализация
Пакет: SysVinit

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: sysvinit-2.86-deb-last-sanify.patch
Скачать


#! /bin/sh /usr/share/dpatch/dpatch-run
## 25_last_sanify.dpatch by Thomas Hood <jdthood@yahoo.co.uk>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: In "last -x" output:
## DP:   + On "reboot" line print endpoint of uptime too
## DP:   + On "shutdown" line print downtime rather that time between downs
## DP:   (Closes: #58119)
@DPATCH@
diff -urNad --exclude=CVS --exclude=.svn ./src/last.c /tmp/dpep-work.yygu5p/trunk/src/last.c
--- ./src/last.c	2005-12-02 17:22:57.000000000 +0100
+++ /tmp/dpep-work.yygu5p/trunk/src/last.c	2006-02-19 22:35:31.000000000 +0100
@@ -418,7 +418,6 @@
 			sprintf(length, "- no logout");
 			break;
 		case R_REBOOT:
-			logouttime[0] = 0;      /* Print machine uptime */
 			break;
 		case R_TIMECHANGE:
 			logouttime[0] = 0;
@@ -717,7 +716,7 @@
 			ut.ut_type = SHUTDOWN_TIME;
 		else if (strncmp(ut.ut_user, "reboot", 6) == 0)
 			ut.ut_type = BOOT_TIME;
-		else if (strncmp(ut.ut_user, "runlevel", 7) == 0)
+		else if (strncmp(ut.ut_user, "runlevel", 8) == 0)
 			ut.ut_type = RUN_LVL;
 	}
 #if 1 /*def COMPAT*/
@@ -752,7 +751,7 @@
 		case SHUTDOWN_TIME:
 			if (extended) {
 				strcpy(ut.ut_line, "system down");
-				quit = list(&ut, lastdown, R_NORMAL);
+				quit = list(&ut, lastboot, R_NORMAL);
 			}
 			lastdown = lastrch = ut.ut_time;
 			down = 1;
@@ -769,6 +768,7 @@
 		case BOOT_TIME:
 			strcpy(ut.ut_line, "system boot");
 			quit = list(&ut, lastdown, R_REBOOT);
+			lastboot = ut.ut_time;
 			down = 1;
 			break;
 		case RUN_LVL:
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin