Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
168 commits
Select commit Hold shift + click to select a range
dfffd24
Use target for drivers in systemd
Aug 21, 2015
746d2a0
nut-driver.target improvements suggested by @peterhoeg in PR#229
jimklimov Oct 10, 2016
b1f3d24
systemd units dependencies revised and commented
jimklimov Oct 10, 2016
ef6fb0f
nut-driver-enumerator.sh initial commit
jimklimov Oct 10, 2016
53f5626
nut-driver@.service.in : integrate comments from @peterhoeg about ext…
jimklimov Oct 11, 2016
4753887
WIP : initial integration of nut-driver-enumerator.sh/service into ma…
jimklimov Oct 11, 2016
16cab58
nut-driver-enumerator.sh renamed into nut-driver-enumerator.sh.in as …
jimklimov Oct 28, 2016
08a6511
nut-driver-enumerator.sh.in : add its own config-file support to set …
jimklimov Oct 28, 2016
879a045
nut-driver-enumerator.sh.in : fix up the copyright header
jimklimov Oct 28, 2016
9cbb9a3
Subject: Fix systemd service file for Debian
jimklimov Jan 28, 2017
7bfb48b
nut-driver-enumerator.sh.in : complete the Solaris SMF support in the…
jimklimov Jan 31, 2017
e4d559d
EXTRA_DIST the scripts/systemd/nut-driver.target (non-templated) file
jimklimov Feb 15, 2017
176f79d
nut-driver-enumerator.sh.in : updated comments (esp. about usage and …
jimklimov Mar 4, 2017
f958b69
nut-driver-enumerator.service.in : define an actual service payload
jimklimov Mar 4, 2017
4bda68c
nut-driver-enumerator.sh.in : refactor the logic of MAIN PROGRAM into…
jimklimov Mar 4, 2017
8588cd5
nut-driver-enumerator.sh.in : introduce routines to help define custo…
jimklimov Mar 4, 2017
a18993c
nut-driver-enumerator.sh.in : allow custom NUT_CONF_DIR from envvar, …
jimklimov Mar 4, 2017
36e6b48
nut-server.service.in : typo fix in comments
jimklimov Mar 4, 2017
a107cfc
nutshutdown.in : mark executable
jimklimov Mar 5, 2017
979f35f
nut-driver-enumerator.sh.in : support the concept of localhost networ…
jimklimov Mar 4, 2017
cf5124a
nut-driver-enumerator.sh.in : added variables for dependency type on …
jimklimov Mar 4, 2017
c156811
nut-driver-enumerator.sh.in : use proper FMRI:instance separator for SMF
jimklimov Mar 4, 2017
b43aa89
nut-driver-enumerator.sh.in : change upsconf_getDriverMedia() output …
jimklimov Mar 4, 2017
2d29617
nut-driver-enumerator.sh.in : refactor with upsconf_getValue() and ca…
jimklimov Mar 4, 2017
ba4bb57
Remove hardcoded dependencies on udev and network from provided syste…
jimklimov Mar 5, 2017
e712755
nut-driver-enumerator.sh.in : complete the systemd drop-in support fo…
jimklimov Mar 5, 2017
2e3a8d9
nut-driver-enumerator.sh.in : complete the SMF drop-in support for cu…
jimklimov Mar 5, 2017
17d246c
nut-driver-enumerator.sh.in : comment-away upslist_debug() in default…
jimklimov Mar 5, 2017
840d308
WIP Adding Solaris SMF manifests for NUT
jimklimov Mar 5, 2017
1eada55
Sanitize Solaris SVR4 packaging rules
jimklimov Mar 5, 2017
1baeab0
Sanitize Solaris packaging scripts some more
jimklimov Mar 5, 2017
46a326d
Add configure options for Solaris packaging variants
jimklimov Mar 5, 2017
7bd7ff6
Sanitize Solaris packaging scripts some more - consider DESTDIR for i…
jimklimov Mar 5, 2017
3adf6a5
Solaris-SMF : svc-nut.in svc-nut-client.in : use @RUN_AS_*@ and @PIDP…
jimklimov Mar 5, 2017
a4f0163
svc-nut.in svc-nut-client.in : consider nut.conf if available
jimklimov Mar 5, 2017
633ea2e
Solaris/nut.in : sanitize the default init-script
jimklimov Mar 5, 2017
40e643a
Turn solaris preproto.pl into a template so it uses proper (configure…
jimklimov Mar 5, 2017
3b884af
Makefile.am : use $(MAKE) $(AM_MAKEFLAGS) instead of explicit "make" …
jimklimov Mar 5, 2017
6aaa44e
Makefile.am : ensure there is a DESTDIR set before packaging
jimklimov Mar 5, 2017
a2aad0f
Makefile.am : ensure the DESTDIR is used for packaging purposes (when…
jimklimov Mar 5, 2017
a79958d
Makefile.am : ensure only the custom DESTDIR is used for packaging pu…
jimklimov Mar 5, 2017
cc44fa6
Makefile.am : convert the big packaging "if" into "case"; link steps …
jimklimov Mar 5, 2017
32a003a
makelocal.sh : commented and revised
jimklimov Mar 5, 2017
cbf06f8
Remove Solaris/prepackage.py (unreferenced duplicate of precheck.py)
jimklimov Mar 5, 2017
94cb83f
Change Aix/nut.init to a .in template
jimklimov Mar 5, 2017
f6c493a
Sanitize Aix/nut.init.in
jimklimov Mar 5, 2017
edc66f3
More standardization of Solaris initscripts and SMF methods; use LD_L…
jimklimov Mar 5, 2017
abc47a4
Solaris/Makefile.am : put generated SVR4 package into builddir (not s…
jimklimov Mar 5, 2017
7e13c99
Solaris/pkginfo.in : ARCH is CPU_TYPE, not OS_NAME
jimklimov Mar 5, 2017
43a3807
GitIgnore built Solaris/NUT*.local.gz product
jimklimov Mar 5, 2017
55da630
GitIgnore built systemd files
jimklimov Mar 5, 2017
5d6dd93
GitIgnore _install_pkgprotodir
jimklimov Mar 5, 2017
bc0ab27
GitIgnore config.cache
jimklimov Mar 5, 2017
75d5fc8
Solaris/Makefile.am : Revise recipe-names and comments for Solaris pa…
jimklimov Mar 5, 2017
8682737
Solaris/Makefile.am and *.xml.in : relocate SMF methods and manifests…
jimklimov Mar 5, 2017
d6ec763
Solaris/Makefile.am : list helper scripts and installation scripts an…
jimklimov Mar 5, 2017
76fbfe0
Solaris/Makefile.am : put init-scripts under NUT share (DATADIR) to p…
jimklimov Mar 5, 2017
bebabc3
Makefile.am .gitignore etc. relocate successfully built package files…
jimklimov Mar 5, 2017
cf90b67
Solaris/Makefile.am and SVR4 scripts : install augeas lenses as part …
jimklimov Mar 5, 2017
549ed5d
configure.ac : comment about sysconfdir for NUT
jimklimov Mar 5, 2017
481f63b
Solaris/Makefile.am : add ability to "make check" something here, e.g…
jimklimov Mar 5, 2017
e1359b7
Solaris SMF XML manifests : fix "dependent" definitions, and add depe…
jimklimov Mar 5, 2017
0b7b1da
configure.ac : fix a manually crafted "Checking for" into using AC_MS…
jimklimov Mar 5, 2017
d5dc7d1
Solaris SVR4 packaging should now take care of SMF service registrati…
jimklimov Mar 5, 2017
e0d77df
Solaris preremove.in postinstall.in : Usage of @datadir@ caused "${pr…
jimklimov Mar 5, 2017
cf5c82f
Solaris scripts : use lower-cased @datadir@ in templates processed by…
jimklimov Mar 5, 2017
6d9691e
Solaris/preremove.in : fix FMRI pattern when removing package
jimklimov Mar 5, 2017
269a3b6
Solaris/postinstall.in : fix SMF manifest dir
jimklimov Mar 5, 2017
11c398b
Solaris/postremove.in : fix verbose RM; wipe the /var/run/nut dir too
jimklimov Mar 5, 2017
d650c78
Solaris/preremove.in : fix commands when removing package
jimklimov Mar 5, 2017
a6e6b62
Solaris/postinstall.in : enable SMF services if configs are already a…
jimklimov Mar 5, 2017
7f1ab8f
Solaris/preremove.in : fix commands when removing package
jimklimov Mar 5, 2017
65a3241
Solaris/postinstall.in : enable SMF services if configs are already a…
jimklimov Mar 5, 2017
8e6e399
Solaris/nut-driver-enumerator.xml.in : use a unique dependency name (…
jimklimov Mar 6, 2017
7440028
systemd and Solaris : fix up embedded ${prefix} in service files and …
jimklimov Mar 6, 2017
b455150
systemd/README : add recent authors
jimklimov Mar 6, 2017
8d6dd03
Define a NUT_DATADIR and NUT_LIBEXECDIR with expanded path values to …
jimklimov Mar 6, 2017
c7cd362
Solaris : packaged service addition/removal more verbose
jimklimov Mar 6, 2017
57c4390
nut-driver-enumerator.xml.in nut-driver.xml.in : do not block startup…
jimklimov Mar 6, 2017
35bcfa0
nut.xml.in : do not block startup of nut server due to failed nut-dri…
jimklimov Mar 6, 2017
b55b2ee
nut-driver-enumerator.xml.in : add REFRESH action and do not die on R…
jimklimov Nov 19, 2017
7a67d1c
nut-driver-enumerator.sh.in : improve portability by using TAB char a…
jimklimov Mar 6, 2017
d28bb9d
nut-driver-enumerator.sh.in : comment the caveats
jimklimov Mar 6, 2017
cc61d77
nut-driver-enumerator.sh.in : apcsmart is serial only
jimklimov Apr 6, 2017
86c290d
nut-driver-enumerator.sh.in : By default, update wrapping of devices …
jimklimov Nov 19, 2017
8f743ed
Introduce upsdrvsvcctl with semantics similar to upsdrvctl, but manag…
jimklimov Nov 19, 2017
25691d2
nut-driver-enumerator.sh.in : refactor a bit and add externally calla…
jimklimov Nov 19, 2017
7894fe1
nut-driver-enumerator.sh.in : consider possible difference of device …
jimklimov Nov 19, 2017
39b2544
nut-driver-enumerator.sh.in : refactor md5
jimklimov Nov 19, 2017
dfefda2
Mention nut-driver-enumerator and upsdrvsvcctl in (systemd/|Solaris/)…
jimklimov Dec 4, 2017
ab8a1d0
upsdrvsvcctl.in : updated comments
jimklimov Dec 4, 2017
f3b8bf8
upsdrvsvcctl.in : added a resync option
jimklimov Dec 4, 2017
4eb2e99
upsdrvsvcctl.in : reformat prettily
jimklimov Dec 4, 2017
ed6743f
Rename Solaris SMF services to match systemd patterns and ease life f…
jimklimov Dec 4, 2017
e0d0da0
Add systemd nut.target to manage the bundle of NUT services
jimklimov Dec 4, 2017
3e43617
config-notes.txt : document the systemd and SMF support in NUT
jimklimov Dec 4, 2017
2dc2821
nut.dict : update spellchecker
jimklimov Dec 4, 2017
bb29a8c
Solaris/Makefile.am : support copying where attrs can not be preserved
jimklimov Dec 4, 2017
346a44a
Solaris postinstall : report if services were not instantly enabled d…
jimklimov Dec 4, 2017
52fb280
nut-driver-enumerator.sh.in : wrap usage()
jimklimov Dec 4, 2017
6491af8
nut-driver-enumerator.sh.in : added --list-services-for-devices
jimklimov Dec 4, 2017
5cddacf
nut-driver@.service.in : comment about aligning timeouts with ups.con…
jimklimov Dec 14, 2017
96deb8f
nut.xml.in : Revise comments
jimklimov Dec 14, 2017
457823b
nut-driver-enumerator.sh.in : when amending service unit instance con…
jimklimov Dec 14, 2017
79feac6
Merge remote-tracking branch 'upstream/master' into systemd-target
jimklimov Mar 8, 2018
cb13743
nut-driver-enumerator.sh.in : support common NUT_CONFPATH envvar
jimklimov Mar 8, 2018
712b6cf
Add upsdrvsvcctl.txt manpage and references to upsdrvsvcctl in other …
jimklimov Mar 8, 2018
b5dc03d
upsdrvsvcctl.txt manpage : refer to service management system logs
jimklimov Mar 8, 2018
5f4db6c
upsdrvsvcctl : support "list upsname" CLI action to help troubleshooting
jimklimov Mar 8, 2018
47f8a4d
upsdrvsvcctl : add handling for "shutdown" command
jimklimov Mar 8, 2018
6893ba7
Docs about upsdrvsvcctl - clarify that it may not be preinstalled wit…
jimklimov Mar 8, 2018
2a45fe9
Pass spellcheck for upsdrvsvcctl doc updates
jimklimov Mar 8, 2018
4155b4a
Solaris packaging of nut-driver-enumerator.sh : deliver into libexecd…
jimklimov Mar 8, 2018
e8e8731
Move nut-driver-enumerator.sh.in and upsdrvsvcctl.in into scripts/ups…
jimklimov Mar 8, 2018
3cffd2a
Use @NUT_LIBEXECDIR@ for nut-driver-enumerator.sh
jimklimov Mar 8, 2018
463b260
Introduce nut-driver-enumerator.path.in for systemd
jimklimov Mar 8, 2018
3c3958a
nut-driver-enumerator.service.in : be part of nut.target, not common …
jimklimov Mar 8, 2018
11a6f02
Systemd services : be PartOf=nut.target to propagate service stops
jimklimov Mar 8, 2018
4501d8f
postinstall.in : use NUT_DATADIR
jimklimov Mar 8, 2018
5f3a22f
nut-monitor.xml.in : depend on nut-server (if locally running)
jimklimov Mar 8, 2018
6764886
nut.xml.in : fix path (use pre-eval-ed version)
jimklimov Mar 8, 2018
c6e8e9f
nut-driver-enumerator.sh.in : add a way to print out just an instance…
jimklimov Mar 8, 2018
4e7eafa
nut-driver-enumerator.sh.in : when printing full instance name, do no…
jimklimov Mar 8, 2018
e5dc735
nut-driver-enumerator.sh.in : implement --get-device-for-service
jimklimov Mar 8, 2018
4b7186f
nut-driver (systemd/SMF) : use "nut-driver-enumerator.sh --get-device…
jimklimov Mar 8, 2018
50e341f
nut.xml.in : this service is transient
jimklimov Mar 9, 2018
3062018
upsdrvsvcctl.in : fix parameter passing
jimklimov Mar 9, 2018
911b998
upsdrvsvcctl.in : "clear" the SMF service state when stopping/startin…
jimklimov Mar 9, 2018
e5b6f26
nut-driver-enumerator.sh.in : restart upsd IFF the set of known-devic…
jimklimov Mar 9, 2018
1daa5d1
Revise and relax some dependencies for Solaris SMF services
jimklimov Mar 9, 2018
92f7f81
nut-driver-enumerator.sh.in : info messages go to stderr; reply for r…
jimklimov Mar 9, 2018
46cc110
nut-driver-enumerator.sh.in : complete the upslist_equals() method
jimklimov Mar 9, 2018
747c7e6
nut.xml.in : never fail on stop (if component services did not stop, …
jimklimov Mar 9, 2018
bb281fa
Solaris preremove.in SMF : clear sevices before stopping them, just i…
jimklimov Mar 9, 2018
c9f7e99
upsdrvsvcctl.in : post-process clearing of SMF service instances if a…
jimklimov Mar 9, 2018
3631c53
nut.xml.in : never fail on stop (if component services did not stop, …
jimklimov Mar 9, 2018
c22e4ea
Solaris preremove.in SMF : remove nut before services it depends on
jimklimov Mar 9, 2018
56f20dc
main.c upsdrvctl.c : make debug messages a bit more useful
jimklimov Mar 9, 2018
04afc32
Solaris preremove.in SMF : do not block stopping NUT driver services,…
jimklimov Mar 9, 2018
f7be5f8
Solaris preremove.in SMF : sleep after stopping drivers before removi…
jimklimov Mar 9, 2018
6e13b88
Solaris preremove.in SMF : force-remove services of drivers
jimklimov Mar 9, 2018
d7ed3b8
nut-driver.xml.in : rename a dependency to avoid conflicts
jimklimov Mar 9, 2018
d928f99
Solaris nut.xml.in : add a refresh action handler
jimklimov Mar 9, 2018
64924bc
Solaris postinstall.in SMF : first use nut-driver-enumerator.sh.in to…
jimklimov Mar 9, 2018
f453b59
Solaris preremove.in SMF : stop drivers with common method (and use N…
jimklimov Mar 9, 2018
fdf0626
Solaris postinstall.in SMF : start the drivers via upsdrvsvcctl after…
jimklimov Mar 9, 2018
5263fde
Solaris postinstall.in preremove.in : NUT_SBINDIR => SBINDIR
jimklimov Mar 9, 2018
6f3ac3e
Add manpage for nut-driver-enumerator[8]
jimklimov Mar 9, 2018
660de49
Handle EXTRA_DIST of scripts/upsdrvsvcctl/ with their own Makefile
jimklimov Mar 9, 2018
bade268
nut-driver-enumerator.txt : change to be more like other page sources
jimklimov Mar 9, 2018
58291c7
Spellcheck nut-driver-enumerator.txt
jimklimov Mar 9, 2018
da800d5
Add scripts/upsdrvsvcctl/README
jimklimov Mar 9, 2018
5de0bfd
Update gitignores
jimklimov Mar 9, 2018
4848a04
List new manpages upsdrvsvcctl nut-driver-enumerator in index
jimklimov Mar 9, 2018
67aeb48
Add upsdrvsvcctl do scripts/Makefile.am SUBDIRS
jimklimov Mar 9, 2018
2c76296
Merge remote-tracking branch 'upstream/master' into systemd-target
jimklimov Apr 6, 2018
75171aa
upsdrvsvcctl.in nut-driver-enumerator.sh.in : Add a way to show confi…
jimklimov Jun 25, 2018
9f439c2
nut-driver-enumerator.sh.in : fix upsconf_getValue() to return succes…
jimklimov Jun 26, 2018
6407d24
nut-driver-enumerator.sh.in : expose upsconf_getValue() as --show-dev…
jimklimov Jun 26, 2018
4580c27
nut-driver-enumerator.sh.in : NOTE on top about the choice of simplif…
jimklimov Jun 27, 2018
4235406
nut-driver-enumerator.sh.in : in upsconf_getSection() stop after prin…
jimklimov Jun 27, 2018
8a47658
nut-driver-enumerator.sh.in : refactor upsconf_getValue() to use upsc…
jimklimov Jun 27, 2018
df1b784
nut-driver-enumerator.sh.in : update comment in header
jimklimov Jul 3, 2018
78ab463
nut-driver-enumerator.service.in : do not fail the systemd unit, it c…
jimklimov Jul 3, 2018
1500359
Merge remote-tracking branch 'upstream/master' into systemd-target
jimklimov Aug 14, 2018
3d19ebe
Fix references for configure.in to point to configure.ac nowadays
jimklimov Aug 14, 2018
67f4fbe
nut-driver-enumerator.sh.in : use fully-pathed SMF svccfg in all part…
jimklimov Aug 14, 2018
02eb306
nut-driver-enumerator.sh.in : comment about not-detecting reconfigura…
jimklimov Aug 14, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
.deps/
.libs/
.inst/
/_install_pkgprotodir/
Makefile
Makefile.in
## Parent directory only
Expand All @@ -19,6 +20,7 @@ Makefile.in
/config.log
/config.status
/config.sub
/config.cache
/configure
/cscope.*
/depcomp
Expand All @@ -33,6 +35,10 @@ common/.dirstamp
# Dist
/nut-*.*.*/
/nut-*.tar.gz
/nut*.rpm
/NUT*.local.gz
/NUT*.p5i
/NUT*.depot

# Official dist
/nut-*.tar.gz.md5
Expand Down
47 changes: 27 additions & 20 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ install-dirs:
@echo "Warning: 'make install-dirs' is deprecated."
@echo "Use 'make installdirs' instead."
@echo $(WARN)
make installdirs
$(MAKE) installdirs
cgi build-cgi install-cgi install-cgi-dir install-cgi-bin \
install-cgi-man install-cgi-conf install-cgi-html:
@echo "Error: 'make $@' no longer exists."
Expand All @@ -137,23 +137,30 @@ snmp build-snmp install-snmp install-snmp-mgr install-snmp-man:
@echo "Use './configure --with-snmp' instead."
setver:
@echo "Error: 'make setver' no longer exists."
@echo "Edit configure.in to set version number."
@echo "Edit configure.ac to set version number."
package:
if test `uname -s` = "HP-UX"; then \
cd scripts/HP-UX; \
make package; \
mv NUT_HPUX_package.depot NUT_HPUX_package@PACKAGE_VERSION@.depot; \
elif test `uname -s` = "SunOS"; then \
make; \
rm -rf @prefix@; \
make install; \
cd scripts/Solaris; \
make package; \
make uninstall; \
rm -rf @prefix@; \
elif test `uname -s` = "AIX"; then \
make dist; \
cp scripts/Aix/nut-aix.spec /usr/src/packages/SPECS; \
cp scripts/Aix/nut.init nut-@PACKAGE_VERSION@.tar.gz /usr/src/packages/SOURCES; \
rpm -ba /usr/src/packages/SPECS/nut-aix.spec; \
fi;
DESTDIR="$(abs_builddir)/_install_pkgprotodir" ; export DESTDIR; \
rm -rf "$$DESTDIR"; \
case "`uname -s`" in \
"HP-UX") \
( cd scripts/HP-UX && \
$(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$DESTDIR" package && \
mv NUT_HPUX_package.depot $(abs_top_builddir)/NUT_HPUX_package@PACKAGE_VERSION@.depot ) ;; \
"SunOS") \
$(MAKE) $(AM_MAKEFLAGS) && \
$(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$DESTDIR" install && \
( cd scripts/Solaris && \
$(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$DESTDIR" package ) && \
$(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$DESTDIR" uninstall && \
rm -rf "$$DESTDIR" || \
{ echo "FAILED to produce SunOS packages, inspect '$$DESTDIR' for clues" >&2 ; exit 1; } ;; \
"AIX") \
if test -d /usr/src/packages/SPECS -a -w /usr/src/packages/SPECS ; then : ; else echo "Can not write to /usr/src/packages/SPECS" >&2 ; exit 1; fi ; \
if test -d /usr/src/packages/SOURCES -a -w /usr/src/packages/SOURCES ; then : ; else echo "Can not write to /usr/src/packages/SOURCES" >&2 ; exit 1; fi ; \
$(MAKE) $(AM_MAKEFLAGS) dist && \
cp scripts/Aix/nut-aix.spec /usr/src/packages/SPECS && \
cp scripts/Aix/nut.init nut-@PACKAGE_VERSION@.tar.gz /usr/src/packages/SOURCES && \
rpm -ba /usr/src/packages/SPECS/nut-aix.spec && \
mv /usr/src/packages/RPMS/nut*rpm $(abs_top_builddir)/ ;; \
*) echo "Unsupported OS for 'make $@' (no recipe bound)" >&2; exit 1;; \
esac
16 changes: 14 additions & 2 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,9 @@ The entry in `ups.conf` looks like this:
driver = apcsmart
port = /dev/ttyS1

To start and stop drivers, use upsdrvctl. By default, it will start or
stop every UPS in the config file:
To start and stop drivers, use upsdrvctl of upsdrvsvcctl (installed on
operating systems with a service management framework supported by NUT).
By default, it will start or stop every UPS in the config file:

/usr/local/ups/sbin/upsdrvctl start
/usr/local/ups/sbin/upsdrvctl stop
Expand All @@ -131,6 +132,17 @@ However, you can also just start or stop one by adding its name:
/usr/local/ups/sbin/upsdrvctl start sparky
/usr/local/ups/sbin/upsdrvctl stop sparky

On operating systems with a supported service management framework,
you might wrap your NUT drivers into individual services instances
with:

/usr/local/ups/sbin/upsdrvsvcctl resync

and then manage those service instances with commands like:

/usr/local/ups/sbin/upsdrvsvcctl start sparky
/usr/local/ups/sbin/upsdrvsvcctl stop sparky

To find the driver name for your device, refer to the section below
called "HARDWARE SUPPORT TABLE".

Expand Down
2 changes: 1 addition & 1 deletion common/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ libparseconf_la_SOURCES = parseconf.c
libcommon_la_SOURCES = common.c state.c str.c upsconf.c
libcommonclient_la_SOURCES = common.c state.c str.c
# ensure inclusion of local implementation of missing systems functions
# using LTLIBOBJS. Refer to configure.in -> AC_REPLACE_FUNCS
# using LTLIBOBJS. Refer to configure.in/.ac -> AC_REPLACE_FUNCS
libcommon_la_LIBADD = libparseconf.la @LTLIBOBJS@
libcommonclient_la_LIBADD = libparseconf.la @LTLIBOBJS@
121 changes: 117 additions & 4 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -328,13 +328,14 @@ dnl Solaris 10/11 USB handling (need librt and libusb runtime path)
dnl HPUX, since v11, needs an explicit activation of pthreads
case ${target_os} in
solaris2.1* )
echo Checking for Solaris 10 / 11 specific configuration for usb drivers
AC_MSG_CHECKING([for Solaris 10 / 11 specific configuration for usb drivers])
AC_SEARCH_LIBS(nanosleep, rt)
LIBUSB_LIBS="-R/usr/sfw/lib ${LIBUSB_LIBS}"
dnl FIXME: Sun's libusb doesn't support timeout (so blocks notification)
dnl and need to call libusb close upon reconnection
AC_DEFINE(SUN_LIBUSB, 1, [Define to 1 for Sun version of the libusb.])
SUN_LIBUSB=1
AC_MSG_RESULT([${LIBUSB_LIBS}])
;;
hpux11*)
CFLAGS="${CFLAGS} -lpthread"
Expand Down Expand Up @@ -1197,6 +1198,90 @@ else
fi
AM_CONDITIONAL(WITH_PKG_CONFIG, test -n "${pkgconfigdir}")

AC_MSG_CHECKING(whether to install Solaris SMF files)
solarissmf="auto"
AC_ARG_WITH([solaris-smf],
AS_HELP_STRING([--with-solaris-smf=(yes|auto|no)], [Enable installation of NUT scripts and manifests for Solaris Service Management Framework (auto)]),
[
case "${withval}" in
auto|"")
solarissmf="auto"
;;
yes|no)
solarissmf="${withval}"
;;
*)
AC_MSG_ERROR([Unexpected argument for --with-solaris-smf=${withval}])
;;
esac
], [])

if test x"$solarissmf" = xauto ; then
if test -x /usr/sbin/svcadm && test -x /usr/sbin/svccfg && test -x /usr/bin/svcs ; then
solarissmf="yes"
else
solarissmf="no"
fi
fi
AC_MSG_RESULT([${solarissmf}])
AM_CONDITIONAL(WITH_SOLARIS_SMF, test x"$solarissmf" = x"yes")

AC_MSG_CHECKING(whether to make Solaris SVR4 packages)
solarispkg_svr4="auto"
AC_ARG_WITH([solaris-pkg-svr4],
AS_HELP_STRING([--with-solaris-pkg-svr4=(yes|auto|no)], [Enable construction of Solaris SVR4 packages (auto)]),
[
case "${withval}" in
auto|"")
solarispkg_svr4="auto"
;;
yes|no)
solarispkg_svr4="${withval}"
;;
*)
AC_MSG_ERROR([Unexpected argument for --with-solaris-pkg-svr4=${withval}])
;;
esac
], [])

if test x"$solarispkg_svr4" = xauto ; then
if test -x /usr/bin/pkgtrans && test -x /usr/bin/pkgmk && test -x /usr/bin/pkgproto ; then
solarispkg_svr4="yes"
else
solarispkg_svr4="no"
fi
fi
AC_MSG_RESULT([${solarispkg_svr4}])
AM_CONDITIONAL(WITH_SOLARIS_PKG_SVR4, test x"$solarispkg_svr4" = x"yes")

AC_MSG_CHECKING(whether to make Solaris IPS packages)
solarispkg_ips="auto"
AC_ARG_WITH([solaris-pkg-ips],
AS_HELP_STRING([--with-solaris-pkg-ips=(yes|auto|no)], [Enable construction of Solaris IPS packages (auto)]),
[
case "${withval}" in
auto|"")
solarispkg_ips="auto"
;;
yes|no)
solarispkg_ips="${withval}"
;;
*)
AC_MSG_ERROR([Unexpected argument for --with-solaris-pkg-ips=${withval}])
;;
esac
], [])

if test x"$solarispkg_ips" = xauto ; then
if test -x /usr/bin/pkg && test -x /usr/bin/pkgmogrify && test -x /usr/bin/pkgdepend ; then
solarispkg_ips="yes"
else
solarispkg_ips="no"
fi
fi
AC_MSG_RESULT([${solarispkg_ips}])
AM_CONDITIONAL(WITH_SOLARIS_PKG_IPS, test x"$solarispkg_ips" = x"yes")

AC_MSG_CHECKING(whether to install systemd files)
AC_ARG_WITH([systemdsystemunitdir],
AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files (auto)]),
Expand Down Expand Up @@ -1473,7 +1558,9 @@ else
AC_MSG_RESULT(no)
fi

dnl expand ${sysconfdir} and write it out
dnl expand ${sysconfdir} and write it out - note that most packages
dnl override it to be /etc/nut, /etc/ups or similar, while the
dnl autotools default would be $prefix/etc
conftemp="${sysconfdir}"
eval conftemp=\"${conftemp}\"
eval conftemp=\"${conftemp}\"
Expand All @@ -1485,6 +1572,7 @@ conftemp="${datadir}"
eval conftemp=\"${conftemp}\"
eval conftemp=\"${conftemp}\"
DATADIR=${conftemp}
NUT_DATADIR=${conftemp}
AC_DEFINE_UNQUOTED(DATADIR, "${conftemp}", [Default path for data files])

dnl same for bindir
Expand All @@ -1508,6 +1596,13 @@ eval conftemp=\"${conftemp}\"
LIBDIR=${conftemp}
AC_DEFINE_UNQUOTED(LIBDIR, "${conftemp}", [Default path for system libraries])

dnl same for libexecdir
conftemp="${libexecdir}"
eval conftemp=\"${conftemp}\"
eval conftemp=\"${conftemp}\"
LIBEXECDIR=${conftemp}
AC_DEFINE_UNQUOTED(LIBEXECDIR, "${conftemp}", [Default path for system exec-libraries])


dnl checks related to --with-snmp enabled on command-line

Expand Down Expand Up @@ -1599,6 +1694,8 @@ AC_SUBST(STATEPATH)
AC_SUBST(CONFPATH)
AC_SUBST(BINDIR)
AC_SUBST(LIBDIR)
AC_SUBST(NUT_DATADIR, [`eval echo "${DATADIR}"`])
AC_SUBST(NUT_LIBEXECDIR, [`eval echo "${LIBEXECDIR}"`])
AC_SUBST(DRVPATH)
AC_SUBST(SBINDIR)
AC_SUBST(PORT)
Expand Down Expand Up @@ -1652,19 +1749,35 @@ AC_OUTPUT([
scripts/devd/nut-usb.conf
scripts/hotplug/Makefile
scripts/hotplug/libhidups
scripts/Aix/nut.init
scripts/HP-UX/nut.psf
scripts/HP-UX/postinstall
scripts/python/Makefile
scripts/upsdrvsvcctl/Makefile
scripts/upsdrvsvcctl/nut-driver-enumerator.sh
scripts/upsdrvsvcctl/upsdrvsvcctl
scripts/systemd/Makefile
scripts/systemd/nut-driver.service
scripts/systemd/nut-driver@.service
scripts/systemd/nut-monitor.service
scripts/systemd/nut-server.service
scripts/systemd/nut-driver-enumerator.service
scripts/systemd/nut-driver-enumerator.path
scripts/systemd/nutshutdown
scripts/Solaris/nut-driver-enumerator.xml
scripts/Solaris/nut-driver.xml
scripts/Solaris/nut-monitor.xml
scripts/Solaris/nut-server.xml
scripts/Solaris/nut.xml
scripts/Solaris/svc-nut-server
scripts/Solaris/svc-nut-monitor
scripts/Solaris/Makefile
scripts/Solaris/pkginfo
scripts/Solaris/preinstall
scripts/Solaris/postinstall
scripts/Solaris/preremove
scripts/Solaris/nut
scripts/Solaris/postremove
scripts/Solaris/preproto.pl
scripts/Solaris/nut
scripts/udev/Makefile
scripts/udev/nut-ipmipsu.rules
scripts/udev/nut-usbups.rules
Expand Down
6 changes: 6 additions & 0 deletions docs/FAQ.txt
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,12 @@ Note: if you jumped in with both feet and didn't follow the INSTALL.nut
document, you probably started upsd by itself. You have to run
'upsdrvctl start' to start the drivers after configuring ups.conf.

On operating systems with a supported service management framework,
you might wrap your NUT drivers into individual services instances
with 'upsdrvsvcctl resync' and then manage those with commands like
'upsdrvsvcctl stop' and 'upsdrvsvcctl start' (note that on other
systems this tool may be not pre-installed via packaging).

== Why don't the pathnames in your documentation match the package I installed?

Each distribution has conventions for where specific file types should be
Expand Down
Loading