v0.2.1 released
This commit is contained in:
parent
4144924831
commit
c34df5f87e
375 changed files with 21133 additions and 0 deletions
61
v0.2.1/scripts/common.sh.inc
Normal file
61
v0.2.1/scripts/common.sh.inc
Normal file
|
@ -0,0 +1,61 @@
|
|||
#
|
||||
# common settings and functions for cryptobox scripts
|
||||
#
|
||||
|
||||
#################### some functions ####################
|
||||
|
||||
# get the path of a configuration file - local configuration files
|
||||
# supersede default files
|
||||
# parameter: base name of the configuration file
|
||||
function get_config_file()
|
||||
{
|
||||
[ -e "$LOCALCONF_DIR/$1" ] && echo "$LOCALCONF_DIR/$1" && return 0
|
||||
[ -e "$DEFAULTCONF_DIR/$1" ] && echo "$DEFAULTCONF_DIR/$1" && return 0
|
||||
echo "configuration file ($1) not found!" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
function error_die()
|
||||
{
|
||||
echo "$2" >&2
|
||||
exit $1
|
||||
}
|
||||
|
||||
|
||||
################### general settings ###################
|
||||
|
||||
# the base directory of your local development files
|
||||
ROOT_DIR=$(dirname "$0")/..
|
||||
|
||||
# the template (default) configuration directory
|
||||
DEFAULTCONF_DIR="$ROOT_DIR/etc-defaults.d"
|
||||
|
||||
# your local configuration directory (existing files supersede the defaults)
|
||||
LOCALCONF_DIR="$ROOT_DIR/etc-local.d"
|
||||
|
||||
# local configuration directory - contains scripts to be executed after
|
||||
# 'configure'
|
||||
CUSTOM_CONFIGURE_DIR="$ROOT_DIR/configure-local.d"
|
||||
|
||||
# template directory for cryptobox specific configuration
|
||||
TEMPLATE_DIR="cbox-tree.d"
|
||||
|
||||
# the chroot-wrapper within the cryptobox
|
||||
CHROOT_START="/usr/lib/cryptobox/chroot-start.sh"
|
||||
|
||||
|
||||
############# include local configuration ##############
|
||||
|
||||
if [ -e "$(get_config_file cbox-dev.conf)" ]
|
||||
then source "$(get_config_file cbox-dev.conf)"
|
||||
else echo "local cbox-dev.conf ($(get_config_file cbox-dev.conf)) does not exist!" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# image directory created by dfsbuild
|
||||
# the BUILD_DIR is defined in the local cbox-dev.conf
|
||||
IMAGE_DIR="$BUILD_DIR/image"
|
||||
IMAGEZ_DIR="$BUILD_DIR/image.z"
|
||||
IMAGEZ_FILE="${IMAGE_FILE/\.iso/_compressed.iso}"
|
||||
UNCOMPRESSED_ITEMS="_offline autorun.inf start.html var boot opt"
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue