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

Collapse All | Expand All

(-)a/init.d/Makefile (-2 / +2 lines)
Lines 22-29 NET_LO-FreeBSD= net.lo0 Link Here
22
SRCS-FreeBSD=	hostid.in moused.in newsyslog.in pf.in rarpd.in rc-enabled.in \
22
SRCS-FreeBSD=	hostid.in moused.in newsyslog.in pf.in rarpd.in rc-enabled.in \
23
		rpcbind.in savecore.in syslogd.in
23
		rpcbind.in savecore.in syslogd.in
24
# These are FreeBSD specific
24
# These are FreeBSD specific
25
SRCS-FreeBSD+=	adjkerntz.in devd.in dumpon.in ipfw.in mixer.in nscd.in \
25
SRCS-FreeBSD+=	adjkerntz.in devd.in encswap.in dumpon.in ipfw.in \
26
		powerd.in syscons.in
26
		mixer.in nscd.in powerd.in syscons.in
27
27
28
NET_LO-Linux=	net.lo
28
NET_LO-Linux=	net.lo
29
SRCS-Linux=	devfs.in dmesg.in hwclock.in consolefont.in keymaps.in \
29
SRCS-Linux=	devfs.in dmesg.in hwclock.in consolefont.in keymaps.in \
(-)a/init.d/encswap.in (+46 lines)
Line 0 Link Here
1
#!@PREFIX@/sbin/runscript
2
# Copyright 1992-2012 FreeBSD Project
3
# Released under the 2-clause BSD license
4
# $Header: $
5
6
depend() {
7
	before swap
8
}
9
10
start() {
11
	while read device mountpoint type options rest ; do
12
		case ":${device}:${type}:${options}" in
13
		:#*)
14
			continue
15
			;;
16
		*.bde:swap:sw)
17
			passphrase=`dd if=/dev/random count=1 2>/dev/null | md5 -q`
18
			device="${device%.bde}"
19
			gbde init "${device}" -P "${passphrase}" || return 1
20
			gbde attach "${device}" -p "${passphrase}" || return 1
21
			;;
22
		*.eli:swap:sw)
23
			device="${device%.eli}"
24
			geli onetime ${geli_swap_flags} "${device}" || return 1
25
			;;
26
		esac
27
	done < /etc/fstab
28
}
29
30
stop() {
31
	while read device mountpoint type options rest ; do
32
		case ":${device}:${type}:${options}" in
33
		:#*)
34
			continue
35
			;;
36
		*.bde:swap:sw)
37
			device="${device%.bde}"
38
			gbde detach "${device}"
39
			;;
40
		*.eli:swap:sw)
41
			# Nothing here, because geli swap devices should be
42
			# created with the auto-detach-on-last-close option.
43
			;;
44
		esac
45
	done < /etc/fstab
46
}

Return to bug 420165