summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-11-03 02:23:46 +0000
committerMike Frysinger <vapier@gentoo.org>2006-11-03 02:23:46 +0000
commitcc40c293c4ee33eb6c5a374f81172c7b4aefc7a7 (patch)
treecc2164ee937e1e21ab0653b53056a5330a72712d /sys-fs/cryptsetup-luks
parentold (diff)
downloadgentoo-2-cc40c293c4ee33eb6c5a374f81172c7b4aefc7a7.tar.gz
gentoo-2-cc40c293c4ee33eb6c5a374f81172c7b4aefc7a7.tar.bz2
gentoo-2-cc40c293c4ee33eb6c5a374f81172c7b4aefc7a7.zip
fixup style
Diffstat (limited to 'sys-fs/cryptsetup-luks')
-rw-r--r--sys-fs/cryptsetup-luks/files/1.0.3-cryptfs.confd20
-rw-r--r--sys-fs/cryptsetup-luks/files/1.0.3-dm-crypt-start.sh50
2 files changed, 35 insertions, 35 deletions
diff --git a/sys-fs/cryptsetup-luks/files/1.0.3-cryptfs.confd b/sys-fs/cryptsetup-luks/files/1.0.3-cryptfs.confd
index c49014a428f1..faa61383ceb6 100644
--- a/sys-fs/cryptsetup-luks/files/1.0.3-cryptfs.confd
+++ b/sys-fs/cryptsetup-luks/files/1.0.3-cryptfs.confd
@@ -21,16 +21,16 @@
# Arguments:
#-----------
-# target=<name> == Mapping name for partition.
-# swap=<name> == Mapping name for swap partition.
-# source='<dev>' == Real device for partition.
-# key='</path/to/keyfile>[:<mode>]' == Fullpath from / or from inside removable media.
-# remdev='<dev>' == Device that will be assigned to removable media.
-# gpg_options='<opts>' == Default are --quiet --decrypt
-# options='<opts>' == cryptsetup, for LUKS you can only use --readonly
-# loop_file='<file>' == Loopback file.
-# pre_mount='cmds' == commands to execute before mounting partition.
-# post_mount='cmds' == commands to execute after mounting partition.
+# target=<name> == Mapping name for partition.
+# swap=<name> == Mapping name for swap partition.
+# source='<dev>' == Real device for partition.
+# key='</path/to/keyfile>[:<mode>]' == Fullpath from / or from inside removable media.
+# remdev='<dev>' == Device that will be assigned to removable media.
+# gpg_options='<opts>' == Default are --quiet --decrypt
+# options='<opts>' == cryptsetup, for LUKS you can only use --readonly
+# loop_file='<file>' == Loopback file.
+# pre_mount='cmds' == commands to execute before mounting partition.
+# post_mount='cmds' == commands to execute after mounting partition.
#-----------
# Supported Modes
# gpg == decrypt and pipe key into cryptsetup.
diff --git a/sys-fs/cryptsetup-luks/files/1.0.3-dm-crypt-start.sh b/sys-fs/cryptsetup-luks/files/1.0.3-dm-crypt-start.sh
index 05faf4e011a0..cb19a9183500 100644
--- a/sys-fs/cryptsetup-luks/files/1.0.3-dm-crypt-start.sh
+++ b/sys-fs/cryptsetup-luks/files/1.0.3-dm-crypt-start.sh
@@ -8,17 +8,17 @@ dm-crypt-execute-checkfs() {
local red='\x1b[31;01m' green='\x1b[32;01m' off='\x1b[0;0m'
if [ -n "$target" ]; then
- # let user set options, otherwise leave empty
- : ${options:=' '}
- elif [ -n "$swap" ]; then
- target=${swap}
- # swap contents do not need to be preserved between boots, luks not required.
- # suspend2 users should have initramfs's init handling their swap partition either way.
- : ${options:='-c aes -h sha1 -d /dev/urandom'}
- : ${pre_mount:='mkswap ${dev}'}
- else
- return
- fi
+ # let user set options, otherwise leave empty
+ : ${options:=' '}
+ elif [ -n "$swap" ]; then
+ target=${swap}
+ # swap contents do not need to be preserved between boots, luks not required.
+ # suspend2 users should have initramfs's init handling their swap partition either way.
+ : ${options:='-c aes -h sha1 -d /dev/urandom'}
+ : ${pre_mount:='mkswap ${dev}'}
+ else
+ return
+ fi
if [ -z "$source" ] && [ ! -e "$source" ]; then
ewarn "source \"${source}\" for ${target} missing, skipping..."
return
@@ -31,8 +31,8 @@ dm-crypt-execute-checkfs() {
fi
# cryptsetup:
- # luksOpen <device> <name> # <device> is $source
- # create <name> <device> # <name> is $target
+ # luksOpen <device> <name> # <device> is $source
+ # create <name> <device> # <name> is $target
local arg1="create" arg2="$target" arg3="$source" luks=0
cryptsetup isLuks ${source} 2>/dev/null && { arg1="luksOpen"; arg2="$source"; arg3="$target"; luks=1; }
@@ -57,13 +57,13 @@ dm-crypt-execute-checkfs() {
do
[ ! -d "$mntrem" ] && mkdir -p ${mntrem} 2>/dev/null >/dev/null
if mount -n -o ro ${remdev} ${mntrem} 2>/dev/null >/dev/null ; then
- sleep 2
- # keyfile exists?
+ sleep 2
+ # keyfile exists?
if [ ! -e "${mntrem}${key}" ]; then
- umount -n ${mntrem} 2>/dev/null >/dev/null
- rmdir ${mntrem} 2>/dev/null >/dev/null
- einfo "Cannot find ${key} on removable media."
- echo -n -e " ${green}*${off} Abort?(${red}yes${off}/${green}no${off})" >/dev/console
+ umount -n ${mntrem} 2>/dev/null >/dev/null
+ rmdir ${mntrem} 2>/dev/null >/dev/null
+ einfo "Cannot find ${key} on removable media."
+ echo -n -e " ${green}*${off} Abort?(${red}yes${off}/${green}no${off})" >/dev/console
read ans </dev/console
echo >/dev/console
[ "$ans" != "yes" ] && { i=0; c=0; } || return
@@ -80,8 +80,8 @@ dm-crypt-execute-checkfs() {
rmdir ${mntrem} 2>/dev/null >/dev/null
einfo "Removable device for ${target} not present."
echo -n -e " ${green}*${off} Abort?(${red}yes${off}/${green}no${off})" >/dev/console
- read ans </dev/console
- echo >/dev/console
+ read ans </dev/console
+ echo >/dev/console
[ "$ans" != "yes" ] && { i=0; c=0; } || return
fi
fi
@@ -99,12 +99,12 @@ dm-crypt-execute-checkfs() {
einfo "Reason: mode ${mode} is invalid."
return
;;
- esac
+ esac
else
mode=none
fi
- splash svc_input_begin checkfs
- ebegin "dm-crypt map ${target}"
+ splash svc_input_begin checkfs
+ ebegin "dm-crypt map ${target}"
einfo "cryptsetup will be called with : ${options} ${arg1} ${arg2} ${arg3}"
if [ "$mode" == "gpg" ]; then
: ${gpg_options:='-q -d'}
@@ -143,7 +143,7 @@ dm-crypt-execute-checkfs() {
fi
if [ -d "$mntrem" ]; then
umount -n ${mntrem} 2>/dev/null >/dev/null
- rmdir ${mntrem} 2>/dev/null >/dev/null
+ rmdir ${mntrem} 2>/dev/null >/dev/null
fi
splash svc_input_end checkfs