hey, On 24/11/2010 Julien Cristau wrote: > On Wed, Nov 24, 2010 at 14:53:59 +0100, David Kuehling wrote: > > > Some warnings were printed during upgrade: > > > > *** > > update-initramfs: Generating /boot/initrd.img-2.6.26-2-686 > > cryptsetup: WARNING: target sda2_crypt has a random key, skipped > > /tmp/mkinitramfs_vkMxi2/scripts/local-top/cryptroot: line 11: [: too many > > arguments > > *** > > > > No problems so far, my crypto-root is booting without problems. > > > 1 #!/bin/sh > 2 > 3 # > 4 # Standard initramfs preamble > 5 # > 6 prereqs() > 7 { > 8 # Make sure that cryptroot is run last in local-top > 9 for req in $(dirname $0)/*; do > 10 script=${req##*/} > 11 if [ $script != cryptroot ]; then > 12 echo $script > 13 fi > 14 done > 15 } > 16 > 17 case $1 in > 18 prereqs) > 19 prereqs > 20 exit 0 > > Weird. Maybe the cryptsetup or initramfs-tools maintainer will have an > idea.
for some reason, $script seems to contain a space. David, please apply attached patch to /usr/share/initramfs-tools/scripts/local-top/cryptroot and see, whether that fixes the bug for you. you can try this by invoking 'update-initramfs -u' after applying the patch. greetings, jonas
--- /usr/share/initramfs-tools/scripts/local-top/cryptroot.orig +++ /usr/share/initramfs-tools/scripts/local-top/cryptroot @@ -8,8 +8,8 @@ # Make sure that cryptroot is run last in local-top for req in $(dirname $0)/*; do script=${req##*/} - if [ $script != cryptroot ]; then - echo $script + if [ "$script" != "cryptroot" ]; then + echo "$script" fi done } @@ -90,9 +90,9 @@ ;; source=*) cryptsource=${x#source=} - if [ ${cryptsource#UUID=} != $cryptsource ]; then + if [ "${cryptsource#UUID=}" != "$cryptsource" ]; then cryptsource="/dev/disk/by-uuid/${cryptsource#UUID=}" - elif [ ${cryptsource#LABEL=} != $cryptsource ]; then + elif [ "${cryptsource#LABEL=}" != "$cryptsource" ]; then cryptsource="/dev/disk/by-label/${cryptsource#LABEL=}" fi export CRYPTTAB_SOURCE="$cryptsource" @@ -198,7 +198,7 @@ modprobe -q dm_crypt # Make sure the cryptsource device is available - if [ ! -e $cryptsource ]; then + if [ ! -e "$cryptsource" ]; then activate_vg activate_evms fi @@ -226,10 +226,10 @@ while [ ! -e "$cryptsource" ]; do /bin/sleep 0.1 slumber=$(( ${slumber} - 1 )) - [ ${slumber} -gt 0 ] || break + [ "${slumber}" -gt 0 ] || break done - if [ ${slumber} -gt 0 ]; then + if [ "${slumber}" -gt 0 ]; then log_end_msg 0 else log_end_msg 1 || true @@ -258,14 +258,14 @@ # Try to get a satisfactory password $crypttries times count=0 - while [ $crypttries -le 0 ] || [ $count -lt $crypttries ]; do + while [ "$crypttries" -le 0 ] || [ "$count" -lt "$crypttries" ]; do count=$(( $count + 1 )) - if [ $count -gt 1 ]; then + if [ "$count" -gt 1 ]; then /bin/sleep 3 fi - if [ $crypttries -gt 0 ] && [ $count -gt $crypttries ]; then + if [ "$crypttries" -gt 0 ] && [ "$count" -gt "$crypttries" ]; then message "cryptsetup: maximum number of tries exceeded for $crypttarget" return 1 fi
signature.asc
Description: Digital signature