From 818766e2ae14d77611b01064fa0a8f9376c0f26f Mon Sep 17 00:00:00 2001 From: Michael Gebetsroither Date: Wed, 18 Jan 2006 00:59:38 +0100 Subject: [PATCH] various small fixes --- debian/changelog | 6 ++++++ debian/control | 2 +- grml-crypt | 23 +++++++++++++++++------ 3 files changed, 24 insertions(+), 7 deletions(-) diff --git a/debian/changelog b/debian/changelog index d8bcbae..10bfe6e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +grml-crypt (0.12) unstable; urgency=low + + * varous small fixes + + -- Michael Gebetsroither Wed, 18 Jan 2006 00:59:11 +0100 + grml-crypt (0.11) unstable; urgency=low * changed dependency to grml-shlib diff --git a/debian/control b/debian/control index da1f459..4d10c2c 100644 --- a/debian/control +++ b/debian/control @@ -7,7 +7,7 @@ Standards-Version: 3.6.1 Package: grml-crypt Architecture: all -Depends: grml-shlib (>=1.02.02), cryptsetup-luks, realpath, dmsetup +Depends: grml-shlib (>=1.02.07), cryptsetup-luks, realpath, dmsetup Description: wrapper arround cryptsetup-luks This software should provide an easy wrapper around cryptsetup-luks, losetup and mount. diff --git a/grml-crypt b/grml-crypt index 084c55d..12c1f70 100755 --- a/grml-crypt +++ b/grml-crypt @@ -86,6 +86,13 @@ ACTIONS: Umount the given mountpoint (umount, luksClose, losetup -d) EOT + + isGrml && cat < grml-crypt with a filesystem image does ONLY + work if the image is on a tmpfs (eg. in /home/grml or /tmp). +EOT + } @@ -284,9 +291,10 @@ function actionFormat die "could not initialise the first 2MB of $TARGET_ with /dev/urandom" elif [[ $OVERWRITE_SOURCE_DEV_ != '/dev/zero' ]]; then # default mode - echo "SECURE mode (taking /dev/urandom as source, this could take some time)" - execute "dd if=/dev/urandom of=$TARGET_ bs=1M &>/dev/null" ||\ - die "could not initialise $TARGET_ with /dev/zero" + echo "SECURE mode (taking $OVERWRITE_SOURCE_DEV_ as source, this could take some time)" + execute "dd if=$OVERWRITE_SOURCE_DEV_ of=$TARGET_ bs=1M &>/dev/null" #||\ + # skipped because "no space left on device" from dd + # die "could not initialise $TARGET_ with $OVERWRITE_SOURCE_DEV_" else echo 'INSECURE mode (only initialising the fist 2MB with /dev/urandom)' execute "dd if=/dev/urandom of=$TARGET_ bs=1M count=2 &>/dev/null" \ @@ -303,15 +311,18 @@ function actionFormat local mount_point_exists_='true' test -d "$MOUNT_POINT_" || mount_point_exists_='false' - if [[ "$MOUNT_POINT_" != "" && "$mount_point_exists_" == 'true' ]]; then + if [[ $MOUNT_POINT_ != "" && "$mount_point_exists_" == 'true' ]]; then $READONLY_SET_ && margs_='-r' execute "mount $margs_ $ADDITIONAL_MOUNT_ARGS_ $DM_PATH_ $MOUNT_POINT_" die else - $mount_point_exists_ || warn "mountpoint $MOUNT_POINT_ does not exist, not mounting. please use \"grml-crypt start $ORIG_TARGET_ \" to start the device" + if [[ $MOUNT_POINT_ != "" ]]; then + $mount_point_exists_ || warn "mountpoint $MOUNT_POINT_ does not exist, not mounting. please use \"grml-crypt start $ORIG_TARGET_ \" to start the device" + fi execute "$CRYPTSETUP_ luksClose $DM_NAME_" warn $IS_IMAGE_ && execute "losetup -d $TARGET_" warn fi else + execute "$CRYPTSETUP_ luksClose $DM_NAME_" warn $IS_IMAGE_ && execute "losetup -d $TARGET_" warn fi } @@ -393,4 +404,4 @@ esac # END OF FILE ################################################################################ -# vim:foldmethod=marker +# vim:foldmethod=marker tabstop=2 expandtab shiftwidth=2 -- 2.1.4