Subject: Add example systemd unit file. From: Richard W.M. Jones rjones@redhat.com Mon Mar 22 10:10:56 2021 +0000 Date: Wed Mar 24 10:19:13 2021 +0000: Git: 5014da5b90713123157b2604ac566514682e7f37 See also: https://github.com/mdbooth/libldm/issues/20 diff --git a/.gitignore b/.gitignore index 4d3a17c..d999470 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ /config.status /configure /ldm-1.0.pc +/ldm.service /libldm-*/ /libldm-*.tar.gz /libtool diff --git a/Makefile.am b/Makefile.am index 646cf90..f0a4ab9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -23,4 +23,6 @@ SUBDIRS = src test docs/reference/libldm docs/reference/ldmtool pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = ldm-1.0.pc +noinst_DATA = ldm.service + EXTRA_DIST = libldm.spec COPYING.lgpl COPYING.gpl diff --git a/configure.ac b/configure.ac index db4bbab..b5ba481 100644 --- a/configure.ac +++ b/configure.ac @@ -119,4 +119,5 @@ AC_CONFIG_FILES([docs/reference/libldm/Makefile]) AC_CONFIG_FILES([docs/reference/ldmtool/Makefile]) AC_CONFIG_FILES([ldm-1.0.pc]) AC_CONFIG_FILES([libldm.spec]) +AC_CONFIG_FILES([ldm.service]) AC_OUTPUT diff --git a/ldm.service.in b/ldm.service.in new file mode 100644 index 0000000..cd586ff --- /dev/null +++ b/ldm.service.in @@ -0,0 +1,12 @@ +[Unit] +Description=Activate Windows Logical Disk Manager volumes +Documentation=man:ldmtool(1) + +[Service] +ExecStart=@bindir@/ldmtool create all +ExecStop=@bindir@/ldmtool remove all +Type=oneshot +RemainAfterExit=yes + +[Install] +WantedBy=multi-user.target