[pkg-cryptsetup-devel] Bug#471729: cryptsetup: crude solution

Christian Pernegger pernegger at gmail.com
Sun Sep 7 21:37:17 UTC 2008


Package: cryptsetup
Version: 2:1.0.6-6
Followup-For: Bug #471729


In the end, I did this:

#!/bin/sh

#set -x 

UUID= # UUID of the USB stick's fs here

UUID_PATH="/dev/disk/by-uuid/$UUID"
MNT_DIR="/usb-key"
KEYFILE="$MNT_DIR/$1"

IN_FD="/proc/self/fd/2"

if ! lsmod | grep -q usb_storage; then
    echo >&2 "Loading USB support ..."
    modprobe usb-storage
    sleep 5
    udevsettle
fi

MOUNTED=0

if [ -b "$UUID_PATH" ]; then
    mkdir "$MNT_DIR" && mount -t ext2 -o ro "$UUID_PATH" "$MNT_DIR" && MOUNTED=1
fi

if [ $MOUNTED -eq 1 -a -e "$KEYFILE" ] ; then
    cat "$KEYFILE"
else
    echo >&2 "Key $1 not found, please enter fallback passphrase:"
    stty <$IN_FD -echo
    read <$IN_FD -rs -t 10 key
    stty <$IN_FD echo
    echo -n $key
fi

if [ $MOUNTED -eq 1 ] ; then
    umount "$MNT_DIR"
    rmdir "$MNT_DIR"
fi



-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.26-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=de_AT.UTF-8, LC_CTYPE=de_AT.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages cryptsetup depends on:
ii  dmsetup                      2:1.02.27-3 The Linux Kernel Device Mapper use
ii  libc6                        2.7-13      GNU C Library: Shared libraries
ii  libdevmapper1.02.1           2:1.02.27-3 The Linux Kernel Device Mapper use
ii  libpopt0                     1.14-4      lib for parsing cmdline parameters
ii  libuuid1                     1.41.0-3    universally unique id library

cryptsetup recommends no packages.

Versions of packages cryptsetup suggests:
ii  dosfstools                    2.11-6     utilities for making and checking 
ii  initramfs-tools [linux-initra 0.92f      tools for generating an initramfs
ii  udev                          0.125-5    /dev/ and hotplug management daemo

-- no debconf information





More information about the pkg-cryptsetup-devel mailing list