[arch-projects] [RFC 17/23] Legacy support for key as <dev>:<offset>:<length>

Tom Gundersen teg at jklm.no
Fri May 18 19:10:19 EDT 2012


Ack.

On Fri, May 18, 2012 at 6:22 PM, Matthew Monaco <dgbaley27 at 0x01b.net> wrote:
> From: Matthew Monaco <matthew.monaco at 0x01b.net>
>
> Give a deprecation notice though.
> ---
>  cryptmount.sh |   12 ++++++++++++
>  1 file changed, 12 insertions(+)
>
> diff --git a/cryptmount.sh b/cryptmount.sh
> index 3844e01..37f5121 100755
> --- a/cryptmount.sh
> +++ b/cryptmount.sh
> @@ -421,6 +421,18 @@ ct_map() {
>                        key="${key#*:}"
>                        key_fstype="${key%%:*}"
>                        key="${key#*:}"
> +                       case "$key_fstype" in
> +                               *[!0-9]*)
> +                                       :;;
> +                               *)
> +                                       warn "<dev>:<offset>:<length> is a deprecated key format. Please use"
> +                                       warn " the keyfile-offset and keyfile-size options instead. This"
> +                                       warn " format will *soon* be removed from cryptmount/crypttab!"
> +                                       opts="$opts --keyfile-offset=$key_fstype --keyfile-size=$key"
> +                                       key="$key_dev"
> +                                       unset key_fstype
> +                                       unset key_dev
> +                       esac
>                        ;;
>                *:*)
>                        key_dev="${key%%:*}"
> --
> 1.7.10.2
>


More information about the arch-projects mailing list