Permalink
Browse files

FreeBSD properly tested

  • Loading branch information...
1 parent 1c3f780 commit bad384b6a4787d2d26a031569047a4df1f577b6d @thomasfrivold committed Aug 4, 2013
Showing with 8 additions and 9 deletions.
  1. +1 −1 LUKSUS.checks
  2. +6 −8 LUKSUS.functions
  3. +1 −0 LUKSUS.variables
View
2 LUKSUS.checks
@@ -84,7 +84,7 @@ echo "$programname is proceeding"
# Dependency check, could need a list and a for loop. recreate as a function and include a for loop
## Which unix system doesnt come with grep... This test is redundant. if [ -z `which grep` ] ;then echo "Missing grep" && exit; fi
-if [ -z `which shred` ] ;then alias shred=gshred; fi
+if [ -z `which shred` ] ;then alias gshred=shred; fi
## This test is deprechated since times has changed and we are more refined now.if [ -z `which cryptsetup` ] ;then echo "Missing cryptsetup" && exit; fi
View
14 LUKSUS.functions
@@ -54,8 +54,8 @@ if [ $UNAME == DragonFly ] ;
then
echo We are on DragonFlyBSD here.
# crude way to deal with different binary names
- alias head=ghead
- alias shred=gshred
+ alias ghead=head
+ alias gshred=shred
# loading dm kernel module in DragonflyBSD
kldload dm
# for some reason vnconfig must be ran once before it will start working
@@ -73,10 +73,8 @@ if [ $UNAME == FreeBSD ] ;
then
echo We are on FreeBSD here. Cool.
# crude way to deal with different binary names
- alias head=ghead
- alias shred=gshred
- alias head ghead
- alias shred gshred
+ alias ghead=head
+ alias gshred=shred
# loading dm kernel module in FreeBSD
kldload geom_eli
else
@@ -136,8 +134,7 @@ DONTSHREDIFLOOPBACK()
# Totally infuse the drive with random data
# 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
+ shred -f -v -n1 $device || gshred -f -v -n1 $device
elif [[ $device = !*vn* ]]
then
echo On DragonFlyBSD. Okay cool.
@@ -423,6 +420,7 @@ echo No Idea What To Do
fi
}
+
DISPLAYSUMMARY()
{
echo ################################################
View
1 LUKSUS.variables
@@ -18,5 +18,6 @@ UNAME=$(uname)
screensize=$(stty size)
height=$(echo $screensize | cut -d " " -f 1)
width=$(echo $screensize | cut -d " " -f 2)
+datenow=$(date)
USEKEY=false
freebsdloopnumber=$(echo $device|{ read; echo "${REPLY#${REPLY%?}}";})

0 comments on commit bad384b

Please sign in to comment.