Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 391945 | Differences between
and this patch

Collapse All | Expand All

(-)a/init.d/Makefile (-1 / +1 lines)
Lines 22-28 SRCS-FreeBSD+= adjkerntz.in devd.in dumpon.in ipfw.in mixer.in nscd.in \ Link Here
22
NET_LO-Linux=	net.lo
22
NET_LO-Linux=	net.lo
23
SRCS-Linux=	devfs.in dmesg.in hwclock.in consolefont.in keymaps.in \
23
SRCS-Linux=	devfs.in dmesg.in hwclock.in consolefont.in keymaps.in \
24
		killprocs.in modules.in mount-ro.in mtab.in numlock.in \
24
		killprocs.in modules.in mount-ro.in mtab.in numlock.in \
25
		procfs.in sysfs.in termencoding.in migrate-run.in
25
		procfs.in sysfs.in termencoding.in
26
26
27
NET_LO-NetBSD=	net.lo0
27
NET_LO-NetBSD=	net.lo0
28
# Generic BSD scripts
28
# Generic BSD scripts
(-)a/init.d/localmount.in (+28 lines)
Lines 4-9 Link Here
4
4
5
description="Mounts disks and swap according to /etc/fstab."
5
description="Mounts disks and swap according to /etc/fstab."
6
6
7
extra_commands="migrate_run"
8
description_migrate_run="Migrate /var/run and /var/lock to /run"
9
10
skip_migrate_run="${skip_migrate_run:-NO}"
11
7
depend()
12
depend()
8
{
13
{
9
	need fsck
14
	need fsck
Lines 12-17 depend() Link Here
12
	keyword -jail -openvz -prefix -vserver -lxc
17
	keyword -jail -openvz -prefix -vserver -lxc
13
}
18
}
14
19
20
migrate_run()
21
{
22
	[ "$RC_UNAME" = Linux ] || return 0
23
24
	einfo "completing /var/run and /var/lock migration."
25
	if [ -d /run/lock -a ! -L /var/lock ]; then
26
		ebegin "Migrating /var/lock to /run"
27
		rm -rf /var/lock
28
		ln -s ../run/lock /var/lock
29
		eend $?
30
	fi
31
32
	if [ -d /run -a ! -L /var/run ]; then
33
		ebegin "Migrating /var/run to /run"
34
		rm -rf /var/run
35
		ln -s ../run /var/run
36
		eend $?
37
	fi
38
	return 0
39
}
40
15
start()
41
start()
16
{
42
{
17
	# Mount local filesystems in /etc/fstab.
43
	# Mount local filesystems in /etc/fstab.
Lines 33-38 start() Link Here
33
59
34
stop()
60
stop()
35
{
61
{
62
	yesno "${skip_migrate_run}" || migrate_run
63
36
	# We never unmount / or /dev or $RC_SVCDIR
64
	# We never unmount / or /dev or $RC_SVCDIR
37
65
38
	# Bug 381783
66
	# Bug 381783
(-)a/init.d/migrate-run.in (-30 lines)
Lines 1-30 Link Here
1
#!@PREFIX@/sbin/runscript
2
# Copyright 1999-2011 Gentoo Foundation
3
# Released under the 2-clause BSD license.
4
5
description="Migrate /var/run and /var/lock to /run"
6
7
depend()
8
{
9
	before *
10
	after localmount
11
}
12
13
start()
14
{
15
	einfo "starting $RC_SVCNAME"
16
	return 0
17
}
18
19
stop()
20
{
21
	einfo "completing /var/run and /var/lock migration."
22
	if [ -d /run -a ! -L /var/lock -a ! -L /var/run ]; then
23
		ebegin "Migrating /var/lock and /var/run to /run"
24
		rm -rf /var/lock /var/run
25
		ln -s /var/lock /run/lock
26
		ln -s /var/run /run
27
		eend 0
28
	fi
29
	return 0
30
}
(-)a/runlevels/Makefile (-1 / +1 lines)
Lines 26-32 BOOT-FreeBSD= hostid net.lo0 newsyslog savecore syslogd Link Here
26
# FreeBSD specific stuff
26
# FreeBSD specific stuff
27
BOOT-FreeBSD+=	adjkerntz dumpon syscons
27
BOOT-FreeBSD+=	adjkerntz dumpon syscons
28
28
29
BOOT-Linux=	hwclock keymaps modules mtab net.lo procfs termencoding migrate-run
29
BOOT-Linux=	hwclock keymaps modules mtab net.lo procfs termencoding
30
SHUTDOWN-Linux=	killprocs mount-ro
30
SHUTDOWN-Linux=	killprocs mount-ro
31
SYSINIT-Linux=	devfs dmesg
31
SYSINIT-Linux=	devfs dmesg
32
32

Return to bug 391945