Migrate /var/lock and /var/run to /run for linux systems

This commit is contained in:
William Hubbs 2011-11-22 08:18:53 -06:00
parent 815952a65a
commit 17a1529416
3 changed files with 30 additions and 2 deletions

View File

@ -22,7 +22,7 @@ SRCS-FreeBSD+= adjkerntz.in devd.in dumpon.in ipfw.in mixer.in nscd.in \
NET_LO-Linux= net.lo
SRCS-Linux= devfs.in dmesg.in hwclock.in consolefont.in keymaps.in \
killprocs.in modules.in mount-ro.in mtab.in numlock.in \
procfs.in sysfs.in termencoding.in
procfs.in sysfs.in termencoding.in migrate-run.in
NET_LO-NetBSD= net.lo0
# Generic BSD scripts

28
init.d/migrate-run.in Normal file
View File

@ -0,0 +1,28 @@
#!@PREFIX@/sbin/runscript
# Copyright 1999-2011 Gentoo Foundation
# Released under the 2-clause BSD license.
description="Migrate /var/run and /var/lock to /run"
depend()
{
before *
after localmount
}
start()
{
return 0
}
stop()
{
if [ -d /run -a ! -L /var/lock -a ! -L /var/run ]; then
ebegin "Migrating /var/lock and /var/run to /run"
rm -rf /var/lock /var/run
ln -s /var/lock /run/lock
ln -s /var/run /run
eend 0
fi
return 0
}

View File

@ -26,7 +26,7 @@ BOOT-FreeBSD= hostid net.lo0 newsyslog savecore syslogd
# FreeBSD specific stuff
BOOT-FreeBSD+= adjkerntz dumpon syscons
BOOT-Linux= hwclock keymaps modules mtab net.lo procfs termencoding
BOOT-Linux= hwclock keymaps modules mtab net.lo procfs termencoding migrate-run
SHUTDOWN-Linux= killprocs mount-ro
SYSINIT-Linux= devfs dmesg