summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2013-07-29 23:13:04 +0200
committerMichał Górny <mgorny@gentoo.org>2013-07-29 23:13:04 +0200
commit92ed74b2093ba2abf9cc12e128ef36af2ac68653 (patch)
tree3d1dda148f79a3c63bd92bbb19a61475d2c4789c
parentInitiate the boilerplate repository. (diff)
downloadgentoo-systemd-integration-92ed74b2093ba2abf9cc12e128ef36af2ac68653.tar.gz
gentoo-systemd-integration-92ed74b2093ba2abf9cc12e128ef36af2ac68653.tar.bz2
gentoo-systemd-integration-92ed74b2093ba2abf9cc12e128ef36af2ac68653.zip
Add the /var/lock & /var/run units from ebuild filesdir.
Those are mostly backwards compatibility.
-rw-r--r--Makefile.am8
-rw-r--r--configure.ac4
-rw-r--r--mounts/var-lock.mount19
-rw-r--r--mounts/var-run.mount19
-rw-r--r--tmpfiles.d/gentoo-run.conf5
5 files changed, 55 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index c44319a..411f4a1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,12 @@
ACLOCAL_AMFLAGS = -I m4
+DISTCHECK_CONFIGURE_FLAGS = \
+ --with-systemdsystemunitdir=\$${libdir}/systemd/system
+
+dist_tmpfiles_DATA = \
+ tmpfiles.d/gentoo-run.conf
+dist_systemdsystemunit_DATA = \
+ mounts/var-lock.mount \
+ mounts/var-run.mount
EXTRA_DIST = NEWS
NEWS: configure.ac Makefile.am
diff --git a/configure.ac b/configure.ac
index aca10ae..8ef759c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,5 +3,9 @@ AC_INIT([gentoo-systemd-integration], [0])
AC_CONFIG_AUX_DIR([build-aux])
AM_INIT_AUTOMAKE([1.6 foreign dist-bzip2 subdir-objects])
+# https://bitbucket.org/mgorny/systemd-sdk/
+SYSTEMD_MISC
+SYSTEMD_SYSTEMUNITDIR
+
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
diff --git a/mounts/var-lock.mount b/mounts/var-lock.mount
new file mode 100644
index 0000000..07277ad
--- /dev/null
+++ b/mounts/var-lock.mount
@@ -0,0 +1,19 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Lock Directory
+Before=local-fs.target
+# skip mounting if the directory does not exist or is a symlink
+ConditionPathIsDirectory=/var/lock
+ConditionPathIsSymbolicLink=!/var/lock
+
+[Mount]
+What=/run/lock
+Where=/var/lock
+Type=bind
+Options=bind
diff --git a/mounts/var-run.mount b/mounts/var-run.mount
new file mode 100644
index 0000000..ab4da42
--- /dev/null
+++ b/mounts/var-run.mount
@@ -0,0 +1,19 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Runtime Directory
+Before=local-fs.target
+# skip mounting if the directory does not exist or is a symlink
+ConditionPathIsDirectory=/var/run
+ConditionPathIsSymbolicLink=!/var/run
+
+[Mount]
+What=/run
+Where=/var/run
+Type=bind
+Options=bind
diff --git a/tmpfiles.d/gentoo-run.conf b/tmpfiles.d/gentoo-run.conf
new file mode 100644
index 0000000..5b3bcab
--- /dev/null
+++ b/tmpfiles.d/gentoo-run.conf
@@ -0,0 +1,5 @@
+# New OpenRC versions replace /var/lock with a symlink to /run/lock.
+# We just create that directory for now, just in case.
+# Of course, it's not guaranteed that'll satisfy all relevant packages.
+
+d /run/lock 0755 root root -