From e194a7a7ba9812062a41c93221dc9ff302665921 Mon Sep 17 00:00:00 2001 From: Tollef Fog Heen Date: Wed, 7 Mar 2012 08:50:15 +0100 Subject: [PATCH] Don't migrate /var/run to a symlink if /run is a symlink --- debian/changelog | 2 ++ debian/debian-fixup | 18 ++++++++++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index 04d12eca..a634146f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -15,6 +15,8 @@ systemd (43-1) experimental; urgency=low * Install a tmpfiles.d file for the /dev/initctl → /run/initctl migration. Closes: #657979 * Disable coredump handling, it's not ready yet. + * If /run is a symlink, don't try to do the /var/run → /run migration. + Ditto for /var/lock → /run/lock. Closes: #647495 [ Michael Biebl ] * Add Build-Depends on liblzma-dev for journal log compression. diff --git a/debian/debian-fixup b/debian/debian-fixup index 399afb82..8d953e46 100755 --- a/debian/debian-fixup +++ b/debian/debian-fixup @@ -5,12 +5,22 @@ set -e if [ ! -L /etc/mtab ]; then ln -sf /proc/mounts /etc/mtab fi + +# Migrate /var/run to be a symlink to /run, unless /run is already a +# symlink, to prevent loops. if [ ! -L /var/run ]; then - rm -rf /var/run - ln -s /run /var/run + if [ ! -L /run ]; then + rm -rf /var/run + ln -s /run /var/run + fi fi + +# Migrate /var/lock to be a symlink to /run/lock, unless /run/lock is +# already a symlink, to prevent loops. if [ ! -L /var/lock ]; then - rm -rf /var/lock - ln -s /run/lock /var/lock + if [ ! -L /run/lock ]; then + rm -rf /var/lock + ln -s /run/lock /var/lock + fi fi exit 0 -- 2.39.5