Automatically tag volumes with %random
Add support for -L, the list operation
Add support for -U, the unmap operation

Without any arguments, use crypttab. Otherwise try to unmap whatever is
given on the command line. This does not support automatically unmapping
volumes which are not in crypttab.

One FIXME might be that when using crypttab, volumes should be handled
in the reverse order.
Check for udevd to avoid waiting for devices

Without udevd, it is unlikely that new devices are going to show up. So
we will know not to wait for them.

Suggested-by: Dave Reisner <dreisner@archlinux.org>
Add function for finding and waiting on a device

This will be for the encrypted device and if the key is a file on an
external device.
Add function for parsing comma separated option list

As far as the structure of the rest of the code goes, this one is a
little different because it sets the swap variable. I'm trying to think
of a cleaner way to do this.

With the exception of some special values, convert the comma separated
list of options to pass directly to cryptsetup. This means we don't have
to explicitly support all of cryptsetups options.

'size' and 'device-size' are needed because (yes) systemd and Debian use
size for cryptsetup's --key-size option. "cryptsetup --size create"
limits the size of a device.

'swap' means run mkswap after mounting, this is standard as far as the
Debian and systemd format goes.

'luks' and 'plain' are also used by Debian and systemd, but they seem
like superfluous configuration because "cryptsetup isLuks" gives this
information.

'noauto' will work with the default $FILTER (-O) of !noauto

'tmp' isn't yet supported, but is by Debian and systemd. I'd like to
support this later on

There is a list of options which are supported by Debian that we'll
ignore.
Add ct_map function (without support for key device)

Resolve device, parse options, run cryptsetup and run mkswap if needed
Check device with blkid before cryptsetup create

Currently in rc.sysinit we check that blkid returns 2 before running
mkswap. This is a little bit stronger. Even without mkswap "cryptsetup
create" can be dangerous, so do the blkid check for all plain (non-LUKS)
mappings. Furthermore, just check for a non-zero return status, if this
is too broad we can get more specific.

Note: A user can still destroy her data if she enters the wrong password
for a cryptsetup create. This we'll leave as the user's fault; she
should be aware of the limitations of a plain mapping and the
--verify-passphrase cryptsetup option.
Add support to ct_map for key devices

The key field may be device:key:fstype or device:key in which case the
device is resolved and mounted if necessary. For these, key must be
relative to the root of the filesystem on the device.

The keydevice is mounted to $(mktemp -d). It is only unmounted if we
mounted it.
Add support for -M, the map operation

There are a few different syntaxes here. With no arguments, the
ct_read_crypttab iterator is used. With 1 argument, a volume is found in
crypttab. With 2-4 arguments, the volume is defined on the command line
and crypttab is not used.
Support Arch Linux idioms for the key field (ASK,SWAP)
Legacy support for key as <dev>:<offset>:<length>

Give a deprecation notice though.