]> err.no Git - systemd/commitdiff
Add debian-fixup service that symlinks mtab to /proc/mounts and migrates /var/run...
authorTollef Fog Heen <tfheen@err.no>
Wed, 21 Sep 2011 06:52:38 +0000 (08:52 +0200)
committerTollef Fog Heen <tfheen@err.no>
Fri, 23 Sep 2011 17:27:41 +0000 (19:27 +0200)
debian/changelog
debian/debian-fixup [new file with mode: 0644]
debian/debian-fixup.service [new file with mode: 0644]
debian/rules
debian/systemd.install
debian/systemd.links

index 6c2f8d3c6ed952716fef72cdff705646c5d91288..69295739c9c2a360de3df2484f31fafbbc602548 100644 (file)
@@ -3,6 +3,8 @@ systemd (35-1) UNRELEASED; urgency=low
   [ Tollef Fog Heen ]
   * New upstream release. Closes: #634618
     - Various man page fixes. Closes: #623521
+  * Add debian-fixup service that symlinks mtab to /proc/mounts and
+    migrates /var/run and /var/lock to symlinks to /run
 
   [ Michael Biebl ]
   * Build for libnotify 0.7.
diff --git a/debian/debian-fixup b/debian/debian-fixup
new file mode 100644 (file)
index 0000000..399afb8
--- /dev/null
@@ -0,0 +1,16 @@
+#! /bin/sh
+
+set -e
+
+if [ ! -L /etc/mtab ]; then
+    ln -sf /proc/mounts /etc/mtab
+fi
+if [ ! -L /var/run ]; then
+    rm -rf /var/run
+    ln -s /run /var/run
+fi
+if [ ! -L /var/lock ]; then
+    rm -rf /var/lock
+    ln -s /run/lock /var/lock
+fi
+exit 0
diff --git a/debian/debian-fixup.service b/debian/debian-fixup.service
new file mode 100644 (file)
index 0000000..1a83d58
--- /dev/null
@@ -0,0 +1,10 @@
+[Unit]
+Description=Various fixups to make systemd work better on Debian
+Before=var-run.mount var-lock.mount
+After=var.mount
+DefaultDependencies=no
+
+[Service]
+ExecStart=/lib/systemd/debian-fixup
+Type=simple
+RemainAfterExit=true
index 81a876f541913e411f261d83befc83f0d704cd92..db53e120bcb2a7a11b84440e700f0a798d96a5eb 100755 (executable)
@@ -25,6 +25,7 @@ override_dh_install:
        rm debian/tmp/lib/security/pam_systemd.la
        rm debian/tmp/usr/lib/*.la
        rm debian/tmp/lib/systemd/system/sysinit.target.wants/systemd-vconsole-setup.service
+       chmod +x debian/debian-fixup
        dh_install -O--parallel --fail-missing
        dh_install -plibpam-systemd debian/pam-configs /usr/share
        dh_install debian/ifup@.service /lib/systemd/system
index 7362951aced593bf58882a52f6f2aacb015191d5..7b6a27d6e72bb58e9b035f9c41ed324a8b582679 100644 (file)
@@ -36,3 +36,5 @@ usr/lib/tmpfiles.d
 debian/init-functions lib/lsb
 debian/lib-init-rw.automount lib/systemd/system/
 debian/lib-init-rw.mount lib/systemd/system/
+debian/debian-fixup lib/systemd/
+debian/debian-fixup.service lib/systemd/system
index 896ed10e604a996adcb1c05e37e7db179ae0d3a9..bf6f69b78eb47d3cb38f6770fbc8beb668912c75 100644 (file)
@@ -52,4 +52,7 @@
 # Mount /lib/init/rw during early startup
 /lib/systemd/system/lib-init-rw.automount /lib/systemd/system/local-fs.target.wants/lib-init-rw.automount
 
+# Run fixups early
+/lib/systemd/system/debian-fixup.service /lib/systemd/system/sysinit.target.wants/debian-fixup.service
+
 # TODO: mtab/udev-mtab (symlink /etc/mtab to /proc/self/mounts in postinst)