Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
executable file 173 lines (136 sloc) 3.62 KB
#!/usr/bin/env bash
# LUKSUS by Thomas Frivold
#
# github code repository (project page):
# https://github.com/thomasfrivold/luksus
#
# fancy website:
# http://thomasfrivold.github.io/luksus
#
# please see README file for complete information regarding LUKSUS
#
# LUKSUS is released under GNU GPLv2 License
# see URL http://www.gnu.org/licenses/gpl-2.0.html
###############################
######### VARIABLES ###########
###############################
if [ -r LUKSUS.variables ]; then
source LUKSUS.variables
else
exit 1
fi
###############################
##### FUNCTIONS ######
###############################
if [ -r LUKSUS.functions ]; then
source LUKSUS.functions
else
exit 1
fi
###############################
###### INITIAL WELCOME ########
###############################
if [ -r LUKSUS.welcome ]; then
source LUKSUS.welcome
else
exit 1
fi
###############################
##### CONDITIONAL CHECKS ######
###############################
if [ -r LUKSUS.checks ]; then
source LUKSUS.checks
else
exit 1
fi
###############################
########## DEBUG ##############
###############################
# CALLING DEBUG FUNCTION FROM #
# ITS OWN SOURCE, SINCE THE #
# MAIN FUNCTIONS FILE EASILY #
# BREAK WHEN THINGS ARE ADDED #
# set DEBUGSTEP=DEBUGSTEP in variables to enable#
###############################
if [ -r LUKSUS.debug ]; then
source LUKSUS.debug
else
exit 1
fi
#########################################################
#########################################################
#########################################################
#########################################################
################ BEGINNING PROGRAM ######################
#########################################################
#########################################################
#########################################################
#########################################################
set -o errtrace #enables error trace with trap
set -o errexit #enables exit tasks with trap
set -o pipefail # quit on errorlevel 1
trap EXITHOUSEKEEPING EXIT # calls housekeeping function on exit. Will be run once for errorlevel 0 and once for every errorlevel 1. awesome.
trap TRAPERR ERR # displays where an error occurred
trap "rm -f $tempfile" 0 1 2 5 15
# Calling functions
OSTEST
# MENUSYSTEM - USER INTERACTION
GRAPHICALWELCOME
WELCOMEINFORMATION
WIZARD
MENUSYSTEM
GRAPHICALVERIFYCHOICES
# deprechated ASKUSERVERIFYCONSOLE # safety check. To be sure.
GRAPHICALLASTCHANCE
# PREPARE KEYFILE
CREATEKEYFILE
# LOOP DEVICE FUNCTIONS AND HOUSEKEEPING
LOOPBACKTEST
DRAGONFLYHOUSEKEEPING
FREEBSDHOUSEKEEPING
NETBSDHOUSEKEEPING
# THE STUFF BELOW REQUIRES STABLE RUNTIME VARIABLES
# NOTE TO SELF - DON'T LET THE USER OR THE PROGRAM ITSELF CHANGE ANY VARIABLES BELOW HERE
# THESE FUNCTIONS GO HAYWIRE IF THOSE VARIABLES ARE NOT PROPERLY SET
# BEGIN PROGRAM
LOOPBACKMETHOD
DEVICEEXISTS
DONTSHREDIFLOOPBACK
### ENCRYPTION PHASE ###
# TRUECRYPT PROCESS
TRUECRYPT
TRUECRYPTKEYFILE
TRUECRYPTOPEN
# LUKS PROCESS
LUKS
LUKSKEYFILE
LUKSVERIFY
LUKSOPEN
# GELI PROCESS
GELI
GELIKEYFILE
GELIOPEN
# CGD PROCESS COMING SOON FOR NETBSD SUPPORT
# CGD
# CGDKEYFILE
# CGDOPEN
# BIOCTL PROCESS MIGHT BE COMING SOON FOR OPENBSD SUPPORT
# BIOCTL
# BIOCTLKEYFILE
# BIOCTLOPEN
# OPENPGPCTL PROCESS MIGHT BE COMING SOON FOR PGP SUPPORT
# OPENPGP
# OPENPGPKEYFILE
# OPENPGPOPEN
# CREATING THE FILESYSTEM AND MOUNTING IT
CREATEANDMOUNTFS
# END PROGRAM
#DISPLAYLOGO
echo The data below can also be found in /keys/$name.information
DISPLAYSUMMARY
WRITEINFORMATIONFILE
DISPLAYSUMMARYGRAPHICAL
# do we really want this anymore DISPLAYSUMMARY
EXITHOUSEKEEPING
GOODBYE
exit 0
Jump to Line
Something went wrong with that request. Please try again.