Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37501706
en ru br
Репозитории ALT
S:2.8.0-alt2
5.1: 2.0.5-alt4
4.1: 2.0.5-alt3
4.0: 2.0.5-alt2
3.0: 2.0.2-alt1
www.altlinux.org/Changes

Группа :: Система/Серверы
Пакет: nut

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

Патч: nut-2.6.0-alt-drivers.patch
Скачать


diff -U 3 -r nut-2.6.0.orig/drivers/main.c nut-2.6.0/drivers/main.c
--- nut-2.6.0.orig/drivers/main.c	2011-02-08 12:57:11 +0200
+++ nut-2.6.0/drivers/main.c	2011-02-08 13:05:17 +0200
@@ -557,6 +557,19 @@
 
 	upsdebugx(1, "debug level is '%d'", nut_debug_level);
 
+	upsdrv_initups();
+
+	/* UPS is detected now, cleanup upon exit */
+	atexit(upsdrv_cleanup);
+
+	/* now see if things are very wrong out there */
+	if (upsdrv_info.status == DRV_BROKEN) {
+		fatalx(EXIT_FAILURE, "Fatal error: broken driver. It probably needs to be converted.\n");
+	}
+
+	if (do_forceshutdown)
+		forceshutdown();
+
 	new_uid = get_user_pwent(user);
 
 	if (chroot_path)
@@ -574,19 +587,6 @@
 	/* clear out callback handler data */
 	memset(&upsh, '\0', sizeof(upsh));
 
-	upsdrv_initups();
-
-	/* UPS is detected now, cleanup upon exit */
-	atexit(upsdrv_cleanup);
-
-	/* now see if things are very wrong out there */
-	if (upsdrv_info.status == DRV_BROKEN) {
-		fatalx(EXIT_FAILURE, "Fatal error: broken driver. It probably needs to be converted.\n");
-	}
-
-	if (do_forceshutdown)
-		forceshutdown();
-
 	/* note: device.type is set early to be overriden by the driver
 	 * when its a pdu! */
 	dstate_setinfo("device.type", "ups");
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin