various small fixes
authorMichael Gebetsroither <michael.geb@gmx.at>
Tue, 17 Jan 2006 23:59:38 +0000 (00:59 +0100)
committerMichael Gebetsroither <michael.geb@gmx.at>
Tue, 17 Jan 2006 23:59:38 +0000 (00:59 +0100)
debian/changelog
debian/control
grml-crypt

index d8bcbae..10bfe6e 100644 (file)
@@ -1,3 +1,9 @@
+grml-crypt (0.12) unstable; urgency=low
+
+  * varous small fixes 
+
+ -- Michael Gebetsroither <michael.geb@gmx.at>  Wed, 18 Jan 2006 00:59:11 +0100
+
 grml-crypt (0.11) unstable; urgency=low
 
   * changed dependency to grml-shlib
index da1f459..4d10c2c 100644 (file)
@@ -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.
index 084c55d..12c1f70 100755 (executable)
@@ -86,6 +86,13 @@ ACTIONS:
               Umount the given mountpoint (umount, luksClose, losetup -d)
 
 EOT
+
+  isGrml && cat <<EOT
+NOTICE:
+   losetup does _NOT_ work on unionfs => 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_ <mountpoint>\" 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_ <mountpoint>\" 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