Package: yaird
Version: 0.0.12-3
Severity: wishlist
Tags: patch

Hi!

Here is a patch which uses blkid to identify the decrypted volume
after cryptsetup did its work.  If the identification fails, it offers
to reenter the password, to ignore the identification failure and
continue anyway (in case the encrypted volume contains something blkid
can't identify) or to open a shell for debugging.

Have a nice day,
Jö.

-- System Information:
Debian Release: testing/unstable
  APT prefers proposed-updates
  APT policy: (500, 'proposed-updates'), (500, 'testing'), (500, 'stable'), (1, 
'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15-1-k7
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=UTF-8)

Versions of packages yaird depends on:
ii  cpio                         2.6-10      GNU cpio -- a program to manage ar
ii  dash                         0.5.3-2     The Debian Almquist Shell
ii  libc6                        2.3.5-13    GNU C Library: Shared libraries an
ii  libhtml-template-perl        2.8-1       HTML::Template : A module for usin
ii  libparse-recdescent-perl     1.94.free-1 Generates recursive-descent parser
ii  perl                         5.8.7-10    Larry Wall's Practical Extraction 

yaird recommends no packages.

-- no debconf information

-- 
Software is like sex; it's better when it's free.
-- Linus Torvalds
--- Templates.cfg.orig  2006-02-17 11:31:38.000000000 +0100
+++ Templates.cfg       2006-02-17 11:49:24.000000000 +0100
@@ -320,6 +320,7 @@
        TEMPLATE cryptsetup
        BEGIN
                FILE "/sbin/cryptsetup"
+               FILE "/sbin/blkid"
                SCRIPT "/init"
                BEGIN
                        !DOCRYPT=1
@@ -335,6 +336,30 @@
                        !               create '<TMPL_VAR NAME=target>' \
                        !               '<TMPL_VAR NAME=src>'
                        !       DOCRYPT=$?
+                       !       while [ -x /sbin/blkid ] && [ "$DOCRYPT" = 0 ] \
+                       !             && [ -z "`/sbin/blkid \
+                       !               '/dev/mapper/<TMPL_VAR NAME=target>'`" ]
+                       !       do echo Blkid can\'t identify the \
+                       !               filesystem on volume \
+                       !               '<TMPL_VAR NAME=target>'.
+                       !          echo Reenter, Ignore, 'Shell?'
+                       !          read a
+                       !          case "$a" in
+                       !          i|I) break;;
+                       !          s|S) if [ -x /bin/bash ]
+                       !               then /bin/bash
+                       !               elif [ -x /bin/sh ]
+                       !               then /bin/sh
+                       !               elif [ -x /bin/dash ]
+                       !               then /bin/dash
+                       !               else echo Sorry, no shell found.
+                       !               fi;;
+                       !          r|R|*) /sbin/cryptsetup \
+                       !                    remove '<TMPL_VAR NAME=target>'
+                       !                 DOCRYPT=1
+                       !                 ;;
+                       !          esac
+                       !       done
                        !done
                END SCRIPT
        END TEMPLATE

Attachment: signature.asc
Description: Digital signature

Reply via email to