Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Regression fix

  • Loading branch information...
commit 232072e146ddda808f4bbe329d59fb67b3baa38c 1 parent 956709a
@thomasfrivold authored
Showing with 32 additions and 22 deletions.
  1. +7 −8 LUKSUS
  2. +13 −12 LUKSUS.functions
  3. +2 −2 LUKSUS.variables
  4. +10 −0 README
View
15 LUKSUS
@@ -70,7 +70,6 @@ fi
# Calling functions
DISPLAYLOGO
-
# OSTEST
OSTEST
@@ -80,11 +79,12 @@ CREATEKEYFILE
# LOOP DEVICE FUNCTIONS AND HOUSEKEEPING
LOOPBACKTEST
DRAGONFLYHOUSEKEEPING
-# FREEBSDHOUSEKEEPING - COMMING SOON
+FREEBSDHOUSEKEEPING
# SAFETY CHECKS
ASKUSERVERIFYDIALOG
ASKUSERVERIFYCONSOLE
+
LOOPBACKMETHOD
DEVICEEXISTS
DONTSHREDIFLOOPBACK
@@ -106,7 +106,6 @@ LUKSOPEN
GELI
GELIKEYFILE
GELIOPEN
-sleep 20
# CGD PROCESS COMMING SOON
# CGD
# CGDKEYFILE
@@ -121,8 +120,8 @@ sleep 20
CREATEANDMOUNTFS
# END PROGRAM
-#DISPLAYLOGO
-#echo The data below can also be found in /keys/$name.information
-#DISPLAYSUMMARY
-#WRITEINFORMATIONFILE
-#exit 0
+DISPLAYLOGO
+echo The data below can also be found in /keys/$name.information
+DISPLAYSUMMARY
+WRITEINFORMATIONFILE
+exit 0
View
25 LUKSUS.functions
@@ -16,11 +16,11 @@ OSTEST()
# OS Checking
if [[ $UNAME == Linux ]]
then
- ENCRYPTION=LUKS
+# ENCRYPTION=LUKS
echo On $UNAME, defaulting to $ENCRYPTION
elif [[ $UNAME == DragonFly ]]
then
- ENCRYPTION=LUKS
+# ENCRYPTION=LUKS
echo On $UNAME, defaulting to $ENCRYPTION
elif [[ $UNAME = FreeBSD ]]
then
@@ -28,7 +28,7 @@ OSTEST()
echo On $UNAME, Encryption set to $ENCRYPTION
else
ENCRYPTION=LUKSUS
- echo No idea $UNAME, defaulting to $ENCRYPTION
+ echo No idea what I am running on $UNAME, defaulting to $ENCRYPTION
fi
}
@@ -40,7 +40,7 @@ LOOPBACKTEST()
elif [[ $device == *vn* ]]
then
loopbackdevice=true
- elif [[ $device = *md* ]]
+ elif [[ $device == *md* ]]
then
loopbackdevice=true
else
@@ -50,7 +50,7 @@ LOOPBACKTEST()
DRAGONFLYHOUSEKEEPING()
{
-if [ $UNAME == DragonFly ] ;
+if [[ $UNAME == DragonFly ]] ;
then
echo We are on DragonFlyBSD here.
# crude way to deal with different binary names
@@ -96,14 +96,14 @@ fi
LOOPBACKMETHOD()
{
- if [[ $loopbackdevice = true ]] && [[ $UNAME = Linux ]]
+ if [[ $loopbackdevice == true ]] && [[ $UNAME == Linux ]]
then
echo Beginning loopbackmethod on $device
head -c $luksfilesize /dev/zero > $luksfile
# block device housekeeping
losetup -f 1>/dev/null 2>/dev/null
losetup $device $luksfile
- elif [[ $loopbackdevice = true ]] && [[ $UNAME = DragonFly ]]
+ elif [[ $loopbackdevice == true ]] && [[ $UNAME == DragonFly ]]
then
echo DragonFlyBSD - Nice...
echo Beginning loopbackmethod on $device
@@ -113,7 +113,7 @@ LOOPBACKMETHOD()
# is initializing something on first run. Then it must run again.
vnconfig 1>/dev/null 2>/dev/null
vnconfig $device $luksfile
- elif [[ $loopbackdevice = true ]] && [[ $UNAME = FreeBSD ]]
+ elif [[ $loopbackdevice == true ]] && [[ $UNAME == FreeBSD ]]
then
echo FreeBSD - Nice...
ghead /dev/zero -c $luksfilesize > $luksfile
@@ -126,7 +126,8 @@ LOOPBACKMETHOD()
DONTSHREDIFLOOPBACK()
{
- if [[ $device != *loop* ]] && [[ $device != *vn* ]] && [[ $device != *md* ]]
+ if [[ $loopbackdevice == false ]] && [[ $UNAME == Linux ]]
+# this test makes little sense now that we are in the future # if [[ $device != *loop* ]] && [[ $device != *vn* ]] && [[ $device != *md* ]]
then
echo "Okay we are using $device ..."
echo Shredding ...
@@ -135,18 +136,18 @@ DONTSHREDIFLOOPBACK()
# Good for paranoid and security minded people
# This takes about 5 hours on a 3TB drive
shred -f -v -n1 $device || gshred -f -v -n1 $device
- elif [[ $device = !*vn* ]]
+ elif [[ $loopbackdevice == false ]] && [[ UNAME == DragonFly ]]
then
echo On DragonFlyBSD. Okay cool.
echo in the middle of the shredding.place
gshred -f -v -n1 $device
- elif [[ $device != *md* ]]
+ elif [[ $loopbackdevice == false ]] && [[ $UNAME == FreeBSD ]]
then
echo On FreeBSD. Okay cool.
echo in the middle of the shredding.place
gshred -f -v -n1 $device
else
-echo "$device is a loopback device"
+ echo "$device is a loopback device. Not shredding, since its no use."
fi
}
View
4 LUKSUS.variables
@@ -1,6 +1,6 @@
programname=LUKSUS
-version=v1.1
-date=04.08.2013
+version=v1.2
+date=05.08.2013
author="Thomas J. Frivold"
time1="$(date +%s.%N)"
# $1, %2, %3, %4 are command line arguments
View
10 README
@@ -327,6 +327,16 @@ A: LUKSUS is maintained in a Github repository.
# NetBSD's CGD and OpenBSDs BIOCTL. This would bump the number of
supported platforms to 5.
+# v1.2
+# Fixes some regressions
+
+# v1.1
+# Adds FreeBSD support
+
+# v1.0
+# LUKSUS is stable and mature enough to be called 1.0
+# Tested on Linux and DragonFlyBSD
+
# v1.0RC4 22.07.2013 15:09
# +Removed some extra integrity checks. They were redundant and broke
# Truecrypt support
Please sign in to comment.
Something went wrong with that request. Please try again.