Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37570897
en ru br
ALT Linux repositórios
S:2.8.0-alt2
5.0: 2.0.5-alt3.1
4.1: 2.0.5-alt3
4.0: 2.0.5-alt2
3.0: 2.0.2-alt1

Group :: Sistema/Servidores
RPM: nut

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

Patch: nut-2.0.5-alt-megatec-shutdown.patch
Download


2007-07-27  Sergey Vlasov  <vsu@altlinux.org>
	Fix megatec shutdown to use "ondelay" and "offdelay" from config.
	* drivers/megatec.c:
	(upsdrv_initinfo): Move "ondelay" and "offdelay" reading from here ...
	(upsdrv_initups): ... to here.
--- nut-2.0.5/drivers/megatec.c.alt-megatec-shutdown	2007-07-27 14:30:47 +0400
+++ nut-2.0.5/drivers/megatec.c	2007-07-27 15:58:23 +0400
@@ -407,14 +407,6 @@ void upsdrv_initinfo(void)
 		}
 	}
 
-	if (getval("ondelay")) {
-		start_delay = CLAMP(atoi(getval("ondelay")), 0, MAX_START_DELAY);
-	}
-
-	if (getval("offdelay")) {
-		shutdown_delay = CLAMP(atoi(getval("offdelay")), 0, MAX_SHUTDOWN_DELAY);
-	}
-
 	/*
 	 * Register the available variables.
 	 */
@@ -742,6 +734,14 @@ void upsdrv_banner(void)
 
 void upsdrv_initups(void)
 {
+	if (getval("ondelay")) {
+		start_delay = CLAMP(atoi(getval("ondelay")), 0, MAX_START_DELAY);
+	}
+
+	if (getval("offdelay")) {
+		shutdown_delay = CLAMP(atoi(getval("offdelay")), 0, MAX_SHUTDOWN_DELAY);
+	}
+
 	upsfd = ser_open(device_path);
 	ser_set_speed(upsfd, device_path, B2400);
 }
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009