Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37898055
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-shutdown-H.patch
Скачать


#! /bin/sh /usr/share/dpatch/dpatch-run
## 90_shutdown_H.dpatch by Petter Reinholdtsen
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Make sure shutdown flags -H and -P are only given with -h flag,
## DP: and document this requirement in the manual page.  Fixes bug
## DP: #331041.
@DPATCH@
diff -urNad --exclude=CVS --exclude=.svn ./man/shutdown.8 /tmp/dpep-work.apEvIZ/trunk/man/shutdown.8
--- ./man/shutdown.8	2006-02-01 14:32:46.000000000 +0100
+++ /tmp/dpep-work.apEvIZ/trunk/man/shutdown.8	2006-02-01 14:36:39.000000000 +0100
@@ -58,8 +58,8 @@
 .\"}}}
 .\"{{{  -H
 .IP \fB\-H\fP
-Halt action is to halt or drop into boot monitor on systems that
-support it.
+Modifier to the -h flag.  Halt action is to halt or drop into boot
+monitor on systems that support it.  Must be used with the -h flag.
 .\"}}}
 .\"{{{  -P
 .IP \fB\-P\fP
diff -urNad --exclude=CVS --exclude=.svn ./src/shutdown.c /tmp/dpep-work.apEvIZ/trunk/src/shutdown.c
--- ./src/shutdown.c	2005-12-02 17:22:57.000000000 +0100
+++ /tmp/dpep-work.apEvIZ/trunk/src/shutdown.c	2006-02-01 14:32:49.000000000 +0100
@@ -521,6 +521,12 @@
   		}
 	}
 
+	if (NULL != halttype && down_level[0] != '0') {
+		fprintf(stderr, "shutdown: -H and -P flags can only be used along with -h flag.\n");
+		usage();
+  		exit(1);
+	}
+
 	/* Do we need to use the shutdown.allow file ? */
 	if (useacl && (fp = fopen(SDALLOW, "r")) != NULL) {
 
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin