[packages/apcupsd] configure scripts from well known location
glen
glen at pld-linux.org
Wed Sep 16 16:23:48 CEST 2015
commit 60b51d79b0eb4bb2ec4998e3dcde8c37d699e426
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Wed Sep 16 17:16:47 2015 +0300
configure scripts from well known location
the old location is also supported, but the file is not packaged
apcupsd.spec | 6 +++---
apcupsd.sysconfig | 8 ++++++++
control-config.patch | 10 ++++++++++
3 files changed, 21 insertions(+), 3 deletions(-)
---
diff --git a/apcupsd.spec b/apcupsd.spec
index 394afbb..078e85e 100644
--- a/apcupsd.spec
+++ b/apcupsd.spec
@@ -20,7 +20,7 @@ Source1: %{name}.init
Source2: %{name}.logrotate
Source3: %{name}.sysconfig
Patch0: %{name}-configure.patch
-
+Patch1: control-config.patch
Patch2: format-security.patch
Patch3: shutdown.patch
Patch4: cxxld.patch
@@ -38,8 +38,8 @@ BuildRequires: man-db
BuildRequires: pkgconfig
BuildRequires: rpmbuild(macros) >= 1.647
BuildRequires: util-linux
-Requires: systemd-units >= 0.38
Requires: rc-scripts
+Requires: systemd-units >= 0.38
Requires(post): fileutils
Requires(post,preun): /sbin/chkconfig
Requires(post,preun,postun): systemd-units >= 38
@@ -96,7 +96,7 @@ serwera NIS. Status każdego UPS-a przedstawia ikona.
%prep
%setup -q
%patch0 -p1
-
+%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
diff --git a/apcupsd.sysconfig b/apcupsd.sysconfig
index 61dc3fd..29171a2 100644
--- a/apcupsd.sysconfig
+++ b/apcupsd.sysconfig
@@ -3,3 +3,11 @@
# Try to define nice-level for running apcupsd
SERVICE_RUN_NICE_LEVEL="+5"
+# Options override for apccontrol tool.
+# These would be used by "hook" scripts
+
+# to whom send reports
+SYSADMIN=root
+
+# path to program to use for mail sending
+APCUPSD_MAIL="/bin/mail"
diff --git a/control-config.patch b/control-config.patch
new file mode 100644
index 0000000..5949923
--- /dev/null
+++ b/control-config.patch
@@ -0,0 +1,10 @@
+--- apcupsd-3.14.13/platforms/apccontrol.in~ 2015-09-16 16:48:10.000000000 +0300
++++ apcupsd-3.14.13/platforms/apccontrol.in 2015-09-16 17:16:01.239002981 +0300
+@@ -27,6 +27,7 @@
+
+ export SYSADMIN=root
+ export APCUPSD_MAIL="@APCUPSD_MAIL@"
++[ -f /etc/sysconfig/apcupsd ] && . /etc/sysconfig/apcupsd
+ if [ -f $SCRIPTDIR/config ]; then . $SCRIPTDIR/config ; fi
+
+ #
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/apcupsd.git/commitdiff/60b51d79b0eb4bb2ec4998e3dcde8c37d699e426
More information about the pld-cvs-commit
mailing list