summaryrefslogtreecommitdiffstats
path: root/etc/rc.d/encswap
diff options
context:
space:
mode:
Diffstat (limited to 'etc/rc.d/encswap')
-rwxr-xr-xetc/rc.d/encswap57
1 files changed, 0 insertions, 57 deletions
diff --git a/etc/rc.d/encswap b/etc/rc.d/encswap
deleted file mode 100755
index 6221998..0000000
--- a/etc/rc.d/encswap
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/bin/sh
-#
-# $FreeBSD$
-#
-
-# PROVIDE: disks
-# REQUIRE: initrandom
-# KEYWORD: nojail
-
-. /etc/rc.subr
-
-name="encswap"
-start_cmd="encswap_attach"
-stop_cmd="encswap_detach"
-
-encswap_attach()
-{
- while read device mountpoint type options rest ; do
- case ":${device}:${type}:${options}" in
- :#*)
- continue
- ;;
- *.bde:swap:sw)
- 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
- ;;
- *.eli:swap:sw)
- device="${device%.eli}"
- geli onetime ${geli_swap_flags} "${device}" || return 1
- ;;
- esac
- done < /etc/fstab
-}
-
-encswap_detach()
-{
- while read device mountpoint type options rest ; do
- case ":${device}:${type}:${options}" in
- :#*)
- continue
- ;;
- *.bde:swap:sw)
- device="${device%.bde}"
- gbde detach "${device}"
- ;;
- *.eli:swap:sw)
- # Nothing here, because geli swap devices should be
- # created with the auto-detach-on-last-close option.
- ;;
- esac
- done < /etc/fstab
-}
-
-load_rc_config $name
-run_rc_command "$1"
OpenPOWER on IntegriCloud