geli (150498) | geli (165683) |
---|---|
1#!/bin/sh 2# 3# Copyright (c) 2005 Pawel Jakub Dawidek <pjd@FreeBSD.org> 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions 8# are met: --- 10 unchanged lines hidden (view full) --- 19# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25# SUCH DAMAGE. 26# | 1#!/bin/sh 2# 3# Copyright (c) 2005 Pawel Jakub Dawidek <pjd@FreeBSD.org> 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions 8# are met: --- 10 unchanged lines hidden (view full) --- 19# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25# SUCH DAMAGE. 26# |
27# $FreeBSD: head/etc/rc.d/geli 150498 2005-09-23 23:53:35Z pjd $ | 27# $FreeBSD: head/etc/rc.d/geli 165683 2006-12-31 10:37:18Z yar $ |
28# 29 30# PROVIDE: disks 31# REQUIRE: initrandom 32# KEYWORD: nojail 33 34. /etc/rc.subr 35 36name="geli" | 28# 29 30# PROVIDE: disks 31# REQUIRE: initrandom 32# KEYWORD: nojail 33 34. /etc/rc.subr 35 36name="geli" |
37start_precmd='[ -n "$(geli_make_list)" ]' |
|
37start_cmd="geli_start" 38stop_cmd="geli_stop" | 38start_cmd="geli_start" 39stop_cmd="geli_stop" |
40required_modules="geom_eli:g_eli" |
|
39 40geli_start() 41{ 42 devices=`geli_make_list` 43 | 41 42geli_start() 43{ 44 devices=`geli_make_list` 45 |
44 # If there are no devices return before loading geom_eli.ko. 45 if [ -z "${devices}" ]; then 46 return 47 fi 48 49 kldstat -q -m g_eli || geli load || err 1 'geom_eli module failed to load.' 50 | |
51 if [ -z "${geli_tries}" ]; then 52 if [ -n "${geli_attach_attempts}" ]; then 53 # Compatibility with rc.d/gbde. 54 geli_tries=${geli_attach_attempts} 55 else 56 geli_tries=`${SYSCTL_N} kern.geom.eli.tries` 57 fi 58 fi --- 37 unchanged lines hidden --- | 46 if [ -z "${geli_tries}" ]; then 47 if [ -n "${geli_attach_attempts}" ]; then 48 # Compatibility with rc.d/gbde. 49 geli_tries=${geli_attach_attempts} 50 else 51 geli_tries=`${SYSCTL_N} kern.geom.eli.tries` 52 fi 53 fi --- 37 unchanged lines hidden --- |