Greetings all, I'm working to integrate my UPS with my SUSE 6.2 system. At present I'm using Tom Webster's genpowerd package, which I've used successfully on SuSE distributions in the past. I've got the whole thing successfully installed except for one problem. The concept is this: genpowerd runs as a daemon monitoring a serial port. When the ups goes on batteries (since the power failed) it signals the serial port and consequently genpowerd. genpowerd writes to the file /etc/powerstatus FAIL and sends kill -s SIGPWR to init. init them executes the script defined inittab. Simple enough eh? This is marked in inittab by the marker powerfail or powerwait with an entry like: pf::powerfail:/sbin/init.d/genpowerfail start If the power returns genpowerd rewrites /etc/powerstatus to OK and init again gets the kill -s SIGPWR. This time since the powerstatus file is "OK" init executes the scipt in inittab defined by the marker powerokwait. In my case: po::powerokwiat:/sbin/init.d/genpowerd stop Note the difference in the arguments being passed to genpowerd in each case. "start" is sent under power fail conditions and stop should be sent when power is restored. Under SuSE 6.2 however the stop argument is never sent to genpowerd. init, it appears, never checks the file /etc/powerstattus, or if it does, it fails to respond properly by executing the command associated with powerwait in inittab. Has anyone else noticed this behavior? Is this FEBCAC, or time for a bug report? If it's FEBCAC, help this lowly hacker with the fix you found, since I'm pulling out what precious little hair I have trying to figure out why my results are not as advertised. I did notice in the man page for init that this method of communication with is "discouraged" and I expect will eventually be deprecated. For the time being (and until I can get time to rewrite the interface for genpowerd) I'd like to make sure that there is a problem with init before I file a bug report. Any help, observations, ideas or suggestions will be happily received. Thanks in advance. best, __ Wm. J. Sandman III Need Win95 or BETTER? Systems Programmer MacOs crashed your new G3? Internet Tool & Die Try Linux... wsandman@tool.net It's not just for breakfast anymore. PGP Key fingerprint = 7C C5 22 45 07 62 4C D9 94 CA C7 C1 44 FF BA D4 <HR> <UL> <LI>application/pgp-signature attachment: stored </UL> -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
On Sun, 28 Nov 1999, William Sandman III wrote: ws> Greetings all, ws> ws> I'm working to integrate my UPS with my SUSE 6.2 system. At ws> present I'm using Tom Webster's genpowerd package, which I've used ws> successfully on SuSE distributions in the past. ws> I'm not familiar with genpower, searched on freshmeat and couldn't find hide or hair of it anywhere so I can't help narrow the problem down. But I wanted to ask if there are actually two commands used? I see below theres a genpowerfail and a genpowerd, from init scripts I normally see, they would be the same with a start and stop rule within it. Again, I couldn't find the package so I can't verify this is the case. ws> pf::powerfail:/sbin/init.d/genpowerfail start ws> po::powerokwiat:/sbin/init.d/genpowerd stop ws> ws> Note the difference in the arguments being passed to genpowerd in ws> each case. "start" is sent under power fail conditions and stop should ws> be sent when power is restored. Under SuSE 6.2 however the stop argument ws> is never sent to genpowerd. init, it appears, never checks the file ws> /etc/powerstattus, or if it does, it fails to respond properly by ws> executing the command associated with powerwait in inittab. ws> ws> Has anyone else noticed this behavior? Is this FEBCAC, or time for ws> a bug report? If it's FEBCAC, help this lowly hacker with the fix you ws> found, since I'm pulling out what precious little hair I have trying to ws> figure out why my results are not as advertised. ws> ws> I did notice in the man page for init that this method of ws> communication with is "discouraged" and I expect will eventually be ws> deprecated. For the time being (and until I can get time to rewrite the ws> interface for genpowerd) I'd like to make sure that there is a problem ws> with init before I file a bug report. ws> ws> Any help, observations, ideas or suggestions will be happily ws> received. Thanks in advance. ws> -- S.Toms - tomas@primenet.com - New homepage coming soon SuSE Linux v6.2+ - Kernel 2.2.13 ... I'm IMAGINING a sensuous GIRAFFE, CAVORTING in the BACK ROOM of a KOSHER DELI!! -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
participants (2)
-
tomas@primenet.com
-
wsandman@tool.net