forked from networkupstools/nut
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Issue networkupstools#1030] Deliver systemd-tmpfiles config to pre-c…
…reate runtime locations
- Loading branch information
Showing
7 changed files
with
52 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1472,6 +1472,7 @@ AM_CONDITIONAL(HAVE_SYSTEMD, test "$systemdsystemunitdir" != "") | |
dnl This option is only provided so that make distcheck can override it, | ||
dnl otherwise we ask pkg-config whenever --with-systemdsystemunitdir is | ||
dnl given | ||
|
||
AC_ARG_WITH([systemdshutdowndir], | ||
AS_HELP_STRING([--with-systemdshutdowndir=DIR], [Directory for systemd shutdown scripts (auto)]), | ||
[systemdshutdowndir=${withval}]) | ||
|
@@ -1482,6 +1483,16 @@ if test -n "${systemdsystemunitdir}"; then | |
esac | ||
fi | ||
|
||
AC_ARG_WITH([systemdtmpfilesdir], | ||
AS_HELP_STRING([--with-systemdtmpfilesdir=DIR], [Directory for systemd tmpfiles scripts (auto)]), | ||
[systemdtmpfilesdir=${withval}]) | ||
if test -n "${systemdsystemunitdir}"; then | ||
case "${systemdtmpfilesdir}" in | ||
yes|auto|"") | ||
systemdtmpfilesdir=`$PKG_CONFIG --variable=tmpfilesdir systemd` | ||
esac | ||
fi | ||
|
||
dnl | ||
dnl Tests for CppUnit availability and usability (will be built if we can, | ||
dnl and if valgrind is enabled for this configuration - reported below). | ||
|
@@ -1909,6 +1920,7 @@ AC_SUBST(htmldir) | |
AC_SUBST(pkgconfigdir) | ||
AC_SUBST(systemdsystemunitdir) | ||
AC_SUBST(systemdshutdowndir) | ||
AC_SUBST(systemdtmpfilesdir) | ||
AC_SUBST(auglensdir) | ||
AC_SUBST(hotplugdir) | ||
AC_SUBST(udevdir) | ||
|
@@ -2058,6 +2070,7 @@ AC_OUTPUT([ | |
scripts/upsdrvsvcctl/nut-driver-enumerator.sh | ||
scripts/upsdrvsvcctl/upsdrvsvcctl | ||
scripts/systemd/Makefile | ||
scripts/systemd/nut-common.tmpfiles | ||
scripts/systemd/[email protected] | ||
scripts/systemd/nut-monitor.service | ||
scripts/systemd/nut-server.service | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
/nut-common.tmpfiles | ||
/nut-driver.service | ||
/[email protected] | ||
/nut-driver.target | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,9 @@ systemdsystemunit_DATA = \ | |
nut-driver.target \ | ||
nut.target | ||
|
||
systemdtmpfiles_DATA = \ | ||
nut-common.tmpfiles | ||
|
||
EXTRA_DIST += nut-driver.target nut.target | ||
|
||
systemdshutdown_SCRIPTS = nutshutdown | ||
|
@@ -20,7 +23,8 @@ libexec_SCRIPTS = ../upsdrvsvcctl/nut-driver-enumerator.sh | |
sbin_SCRIPTS = ../upsdrvsvcctl/upsdrvsvcctl | ||
|
||
else | ||
EXTRA_DIST += [email protected] nut-monitor.service.in \ | ||
EXTRA_DIST += \ | ||
nut-common.tmpfiles.in [email protected] nut-monitor.service.in \ | ||
nut-server.service.in nutshutdown.in nut-driver.target nut.target \ | ||
nut-driver-enumerator.path.in nut-driver-enumerator.service.in | ||
endif | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# State file (e.g. upsd to driver) and pidfile location for NUT: | ||
d @runbasedir@/nut 0770 @RUN_AS_USER@ @RUN_AS_GROUP@ - - | ||
X @runbasedir@/nut | ||
d @statepath@/nut 0770 @RUN_AS_USER@ @RUN_AS_GROUP@ - - | ||
X @statepath@/nut | ||
d @pidpath@/nut 0770 @RUN_AS_USER@ @RUN_AS_GROUP@ - - | ||
X @pidpath@/nut |