gbde_swap has been repo-copied to encswap.
Repo-copy made by: markm
This commit is contained in:
parent
0d974f75a8
commit
0b10714f0f
@ -8,9 +8,9 @@ FILES= DAEMON LOGIN NETWORKING SERVERS \
|
||||
ccd cleanvar cleartmp cron \
|
||||
devd devfs dhclient \
|
||||
dmesg dumpon \
|
||||
early.sh \
|
||||
early.sh encswap \
|
||||
fsck \
|
||||
gbde gbde_swap \
|
||||
gbde \
|
||||
hostname \
|
||||
ike \
|
||||
inetd initrandom \
|
||||
|
@ -1,55 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
# PROVIDE: disks
|
||||
# REQUIRE: initrandom
|
||||
# KEYWORD: nojail
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name="gbde_swap"
|
||||
start_cmd="gbde_swap_attach"
|
||||
stop_cmd="gbde_swap_detach"
|
||||
|
||||
gbde_swap_attach()
|
||||
{
|
||||
while read device mountpoint type options rest ; do
|
||||
case ":${device}:${type}:${options}" in
|
||||
:#*)
|
||||
continue
|
||||
;;
|
||||
*.bde:swap:sw)
|
||||
;;
|
||||
*)
|
||||
continue
|
||||
;;
|
||||
esac
|
||||
passphrase=`dd if=/dev/random count=1 2>/dev/null | md5 -q`
|
||||
device="${device%.bde}"
|
||||
gbde init "${device}" -P "${passphrase}" || return 1
|
||||
gbde attach "${device}" -p "${passphrase}" || return 1
|
||||
done < /etc/fstab
|
||||
}
|
||||
|
||||
gbde_swap_detach()
|
||||
{
|
||||
while read device mountpoint type options rest ; do
|
||||
case ":${device}:${type}:${options}" in
|
||||
:#*)
|
||||
continue
|
||||
;;
|
||||
*.bde:swap:sw)
|
||||
;;
|
||||
*)
|
||||
continue
|
||||
;;
|
||||
esac
|
||||
device="${device%.bde}"
|
||||
gbde detach "${device}"
|
||||
done < /etc/fstab
|
||||
}
|
||||
|
||||
load_rc_config $name
|
||||
run_rc_command "$1"
|
Loading…
x
Reference in New Issue
Block a user