systemd/restore-var-run-and-var-lock-bind-mount-if-they-aren-t-sym.patch
Dr. Werner Fink 4ae8e483c0 - Update to release 202:
+ 'systemctl list-jobs' got some polishing. '--type=' argument
    may now be passed more than once. 'systemctl list-sockets' has
    been added.
  + systemd gained a new unit 'systemd-static-nodes.service'
    that generates static device nodes earlier during boot, and
    can run in conjunction with udev.
  + systemd-nspawn now places all containers in the new /machine
    top-level cgroup directory in the name=systemd hierarchy.
  + bootchart can now store its data in the journal.
  + journactl can now take multiple --unit= and --user-unit=
    switches.
  + The cryptsetup logic now understands the "luks.key=" kernel
    command line switch. If a configured key file is missing, it
    will fallback to prompting the user.
- Rebase some patches
- Update handle-SYSTEMCTL_OPTIONS-environment-variable.patch to
  properly handle SYSTEMCTL_OPTIONS

- Fix regression in the default for tmp auto-deletion
  (systemd-tmp-safe-defaults.patch, FATE#314974).

- Add chromebook lid switch as a power switch to logind rule to
  enable suspend on lid close

- Update to release 202:
  + 'systemctl list-jobs' got some polishing. '--type=' argument
    may now be passed more than once. 'systemctl list-sockets' has
    been added.
  + systemd gained a new unit 'systemd-static-nodes.service'

OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=365
2013-04-19 20:31:17 +00:00

90 lines
2.5 KiB
Diff

From: Frederic Crozat <fcrozat@suse.com>
Date: Mon, 29 Oct 2012 13:01:20 +0000
Subject: restore /var/run and /var/lock bind mount if they aren't symlink
---
Makefile.am | 9 +++++++++
units/var-lock.mount | 19 +++++++++++++++++++
units/var-run.mount | 19 +++++++++++++++++++
3 files changed, 47 insertions(+)
create mode 100644 units/var-lock.mount
create mode 100644 units/var-run.mount
diff --git a/Makefile.am b/Makefile.am
index e82d092..38309a9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -406,6 +406,12 @@ dist_systemunit_DATA = \
units/system-update.target \
units/initrd-switch-root.target
+if HAVE_SYSV_COMPAT
+dist_systemunit_DATA += \
+ units/var-run.mount \
+ units/var-lock.mount
+endif
+
nodist_systemunit_DATA = \
units/getty@.service \
units/serial-getty@.service \
@@ -4018,6 +4024,9 @@ RUNLEVEL4_TARGET_WANTS += \
systemd-update-utmp-runlevel.service
RUNLEVEL5_TARGET_WANTS += \
systemd-update-utmp-runlevel.service
+LOCAL_FS_TARGET_WANTS += \
+ var-run.mount \
+ var-lock.mount
endif
SHUTDOWN_TARGET_WANTS += \
systemd-update-utmp-shutdown.service
diff --git a/units/var-lock.mount b/units/var-lock.mount
new file mode 100644
index 0000000..07277ad
--- /dev/null
+++ b/units/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/units/var-run.mount b/units/var-run.mount
new file mode 100644
index 0000000..ab4da42
--- /dev/null
+++ b/units/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