<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Jun 20, 2013, at 10:35 AM, Louis Chaillet wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">With respect clarification of the documentation (and reference to your question Charles). The documentation does suggest that you can shutdown the ups by the upsdrvclt shutdown [ups] command. Specifically in "<a href="http://www.networkupstools.org/docs/man/upsdrvctl.html" target="_blank">http://www.networkupstools.org/docs/man/upsdrvctl.html</a>" in the section commands under warning. In the "Network UPS Tools User Manual" (pdf) under section 6.3.2 in the last paragraph it is suggested to first test the /usr/local/ups/bin/upsdrvctl -t shutdown and then "upsmon -c fsd". Also this section suggests that under some circumstances you cannot rely on the shutdown sequence to issue this command.</blockquote><div>

<br></div><div>Thanks, noted.</div><div><br></div><blockquote type="cite"><div>However the real reason I tried "upsdrctl -c shutdown" (not the test) is that I  already tested the setup with the "upsmon -c fsd". The results is that the server closes down, as expected, but ups does not shutdown, and so there is no restart of the server.</div>

<div><br></div><div>I was guessing it has to do with the particular shutdown command of the server I have, which was "<span class="Apple-style-span" style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse;color:rgb(34,34,34)">SHUTDOWNCMD "/usr/lib/web-admin/<a href="http://backend.pl/" target="_blank" style="color:rgb(17,85,204)">backend.pl</a> power_off"". And I was trying to fix that by calling the upsdrvctl shutdown command directly from a script. </span></div>
<meta http-equiv="content-type" content="text/html; charset=utf-8"><div><span class="Apple-style-span" style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse;color:rgb(34,34,34)"><br></span></div><div>
<span class="Apple-style-span" style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse;color:rgb(34,34,34)">As I do not use the packaged (debian) shutdown script (/sbin/shutdown) do I need to tell the ups to power down myself, as   suggested in  the documentation (configuration notes, see reference above)?</span></div></blockquote><div><br></div><div>I haven't traced through the Debian shutdown sequence recently, but I think that they call "upsdrvctl shutdown" after the rest of the system processes have shut down (including the NUT driver). That should avoid the "device or resource busy" error - only one process can open the UPS USB device node at a time.</div><div><br></div></div><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>-- </div><div>Charles Lepple</div><div><br></div><div><div>A: Because it messes up the order in which people normally read text.</div><div>Q: Why is top-posting such a bad thing?</div><div>A: Top-posting.</div><div>Q: What is the most annoying thing on usenet and in e-mail?</div></div></div></span></span>
</div>

<br></body></html>