Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 May 2006 00:06:18 -0400 (EDT)
From:      Scott "Tuc" Ellentuch at T-B-O-H <ml@t-b-o-h.net>
To:        petermatulis@yahoo.ca (Peter)
Cc:        freebsd-questions <freebsd-questions@freebsd.org>
Subject:   Re: Anyone using sysutils/nut ?
Message-ID:  <200605230406.k4N46IFI009839@himinbjorg.tucs-beachin-obx-house.com>
In-Reply-To: <20060522231124.89973.qmail@web60014.mail.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> 
> --- Scott Tuc Ellentuch at T-B-O-H <ml@t-b-o-h.net> wrote:
> 
> > Hi,
> > 
> > 	I'd like to find out where to put the "upsdrvctl shutdown" in the
> > shutdown process. Putting it in rc.shutdown causes me to have dirty 
> > filesystems constantly that sometimes don't allow the system to come
> > up.
> 
> You don't.  Instead, use the nut configuration files (ups.conf,
> upsd.conf, upsmon.conf, hosts.conf, upsd.users).  upsdrvctl is called
> internally from upsd.  That is how I understand it.
> 
	I'm going by :

	/usr/local/share/doc/nut/shutdown.txt

	Subsection "How you set it up", item #2 :

2. Edit your shutdown scripts to check for the POWERDOWNFLAG so they know
   when to power off the UPS.  You must check for this file, as you don't
   want this to happen during normal shutdowns!

   You can use upsdrvctl to start the shutdown process in your UPS 
   hardware.  Use this script as an example, but change the paths to
   suit your system:

   if (test -f /etc/killpower)
   then
        echo "Killing the power, bye!"
        /usr/local/ups/bin/upsdrvctl shutdown

        sleep 120

        # uh oh... the UPS poweroff failed!
        # you probably should reboot here to avoid getting stuck
        # *** see the section on power races below ***
   fi

	(There is more.....)






	In talking to the people on the NUT list, no
one mentioned that it was called from upsd. 

			Thanks, Tuc



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200605230406.k4N46IFI009839>