diff options
author | Danilo G. Baio <dbaio@FreeBSD.org> | 2019-05-11 18:30:41 +0000 |
---|---|---|
committer | Danilo G. Baio <dbaio@FreeBSD.org> | 2019-05-11 18:30:41 +0000 |
commit | 45ff050892b243bc3a9295f6f1ecfe13c8f2dfcf (patch) | |
tree | cdd2362eec3bad990ec00d8698266c3d871165e1 /sysutils/apcupsd/files | |
parent | f744857c57e6cf65ae81e4a054293373018c74b8 (diff) | |
download | ports-45ff050892b243bc3a9295f6f1ecfe13c8f2dfcf.tar.gz ports-45ff050892b243bc3a9295f6f1ecfe13c8f2dfcf.zip |
sysutils/apcupsd: Improve pkg-message
In some systems where the shutdown can take a while (like in bhyve
environment), users may want to change the default shutdown behavior.
PR: 237600
Reported by: Victor Sudakov <vas@mpeks.tomsk.su>
Notes
Notes:
svn path=/head/; revision=501281
Diffstat (limited to 'sysutils/apcupsd/files')
-rw-r--r-- | sysutils/apcupsd/files/pkg-message.in | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/sysutils/apcupsd/files/pkg-message.in b/sysutils/apcupsd/files/pkg-message.in index 0daa595fb05b..112896765704 100644 --- a/sysutils/apcupsd/files/pkg-message.in +++ b/sysutils/apcupsd/files/pkg-message.in @@ -1,25 +1,30 @@ ********************************************************************** -Read the manual: - http://www.apcupsd.org/manual/manual.html - http://www.apcupsd.org/manual/manual.pdf +Read the manual: http://www.apcupsd.org/manual/manual.html + http://www.apcupsd.org/manual/manual.pdf Sample files and scripts are installed in %%ETCDIR%%. You need to modify %%ETCDIR%%/apcupsd.conf as follows: For serial cable: DEVICE /dev/cuadX (or /dev/cuaaX for [45.]x) For USB cable: DEVICE (yes, leave it blank after DEVICE) + NOTE that for USB cable you need uhid support. -NOTE that for USB cable you need uhid support. +Add apcupsd_enable=YES to your /etc/rc.conf[.local] to have apcupsd +starting up at boot time. -To compile this driver into the kernel, place the following line in your -kernel configuration file: - device uhid +For default, apcupsd starts with `--kill-on-powerfail` parameter. +Please, read its man page, and if this is not the intended behavior you want, +change it accordingly. -Alternatively, to load the driver as a module at boot time, place the -following line in loader.conf(5): - uhid_load="YES" +In some systems where the shutdown can take a while (like in bhyve environment), +you may want to change this behavior as follows: -Add apcupsd_enable=YES to your /etc/rc.conf[.local] to have apcupsd -starting up at boot time. +Set apcupsd_flags="--term-on-powerfail" on your /etc/rc.conf[.local]. + +Add this to /etc/rc.shutdown, after the "Insert other shutdown procedures here" +line: + test -f /var/run/powerfail && /usr/local/sbin/apcupsd --hibernate + or + test -f /var/run/powerfail && /usr/local/sbin/apcupsd --power-off ********************************************************************** |