Репозитории ALT
5.1: | 2.86-alt2 |
4.1: | 2.86-alt2 |
4.0: | 2.86-alt1 |
3.0: | 2.85-alt8 |
Группа :: Система/Настройка/Загрузка и инициализация
Пакет: 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) {