Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated Driver.List after discrimination #4

Open
wants to merge 12 commits into
base: issue-441+legrand
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 9 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,15 @@ matrix:
apt:
packages:
- *deps_driverlibs
- env:
- BUILD_TYPE=default-tgt:distcheck-light
- NO_PKG_CONFIG=true
os: linux
sudo: true
addons:
apt:
packages:
- *deps_driverlibs

before_install:
- if [ $TRAVIS_OS_NAME == "osx" ] ; then brew update; brew install binutils asciidoc docbook-xsl ; XML_CATALOG_FILES=/usr/local/etc/xml/catalog ; export XML_CATALOG_FILES ; fi
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@[email protected]; \
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-@[email protected] /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@[email protected] ) ;; \
"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-@[email protected] /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
11 changes: 11 additions & 0 deletions ci_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,18 @@ default|default-alldrv|default-spellcheck|default-nodoc|default-withdoc|"default
[ -z "$CI_TIME" ] || echo "`date`: Starting build of currently tested project..."
CCACHE_BASEDIR=${PWD}
export CCACHE_BASEDIR

# Note: modern auto(re)conf requires pkg-config to generate the configure
# script, so to stage the situation of building without one (as if on an
# older system) we have to remove it when we already have the script.
# This matches the use-case of distro-building from release tarballs that
# include all needed pre-generated files to rely less on OS facilities.
$CI_TIME ./autogen.sh 2> /dev/null
if [ "$NO_PKG_CONFIG" == "true" ] ; then
echo "NO_PKG_CONFIG==true : BUTCHER pkg-config for this test case" >&2
sudo dpkg -r --force all pkg-config
fi

$CI_TIME ./configure "${CONFIG_OPTS[@]}"

case "$BUILD_TYPE" in
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@
Loading