-
Notifications
You must be signed in to change notification settings - Fork 176
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add hwloc-dump-hwdata.service systemd service file
It lets systemd run hwloc-dump-hwdata at startup. We don't install the file but rather let packagers install it for now. Thanks to Grzegorz Andrejczuk.
- Loading branch information
Showing
4 changed files
with
48 additions
and
1 deletion.
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
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,22 @@ | ||
# Copyright © 2016 Inria. All rights reserved. | ||
# See COPYING in top-level directory. | ||
|
||
# We can't use autoconf because we don't want $sbindir to be replaced with ${exec_prefix}/sbin | ||
# Also don't install since , let the packagers do it. | ||
|
||
EXTRA_DIST = hwloc-dump-hwdata.service.in | ||
|
||
if HWLOC_HAVE_LINUX | ||
nodist_pkgdata_DATA = hwloc-dump-hwdata.service | ||
# depend on Makefile in case we rerun configure with different directory arguments | ||
hwloc-dump-hwdata.service: hwloc-dump-hwdata.service.in Makefile | ||
@echo Creating $@... | ||
@ $(SED) \ | ||
-e 's@#SBINDIR#@'$(sbindir)'@g' \ | ||
-e 's@#RUNSTATEDIR#@'$(HWLOC_runstatedir)'@g' \ | ||
-e 's@#RMPATH#@'$(RMPATH)'@g' \ | ||
> $@ < $< | ||
|
||
distclean-local: | ||
rm -f hwloc-dump-hwdata.service | ||
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,22 @@ | ||
# | ||
# Copyright © 2015-2016 Intel, Inc. All rights reserved. | ||
# Copyright © 2016 Inria. All rights reserved. | ||
# See COPYING in top-level directory. | ||
# | ||
# #RUNSTATEDIR#/hwloc was specified at configure time. | ||
# It may be changed by passing configure options such as --runstatedir, | ||
# --localstatedir or --prefix. | ||
# It may also be manually changed before installing this file in systemd directories. | ||
# | ||
|
||
[Unit] | ||
Description=Dump hardware topology and locality information to #RUNSTATEDIR#/hwloc | ||
|
||
[Service] | ||
Type=oneshot | ||
RemainAfterExit=yes | ||
ExecStart=#SBINDIR#/hwloc-dump-hwdata -o #RUNSTATEDIR#/hwloc | ||
ExecStop=#RMPATH# -rf #RUNSTATEDIR#/hwloc | ||
|
||
[Install] | ||
WantedBy=multi-user.target |