debian-fixup 546 Bytes
Newer Older
1 2 3 4 5 6 7
#! /bin/sh

set -e

if [ ! -L /etc/mtab ]; then
    ln -sf /proc/mounts /etc/mtab
fi
8 9 10

# Migrate /var/run to be a symlink to /run, unless /run is already a
# symlink, to prevent loops.
11
if [ ! -L /var/run ]; then
12 13 14 15
    if [ ! -L /run ]; then
        rm -rf /var/run
        ln -s /run /var/run
    fi
16
fi
17 18 19

# Migrate /var/lock to be a symlink to /run/lock, unless /run/lock is
# already a symlink, to prevent loops.
20
if [ ! -L /var/lock ]; then
21 22 23 24
    if [ ! -L /run/lock ]; then
        rm -rf /var/lock
        ln -s /run/lock /var/lock
    fi
25 26
fi
exit 0