|
|
|
@ -43,9 +43,6 @@ CUSTOM_CONFIGURE_DIR="$ROOT_DIR/configure-local.d"
|
|
|
|
|
# template directory for cryptobox specific configuration
|
|
|
|
|
TEMPLATE_DIR="cbox-tree.d"
|
|
|
|
|
|
|
|
|
|
# dfsbuild config
|
|
|
|
|
CONFIG=$(get_config_file dfs-cbox.conf)
|
|
|
|
|
|
|
|
|
|
# the chroot-wrapper within the cryptobox
|
|
|
|
|
CHROOT_START="/usr/lib/cryptobox/chroot-start.sh"
|
|
|
|
|
|
|
|
|
@ -71,6 +68,11 @@ if [ -e "$(get_config_file cbox-dev.conf)" ]
|
|
|
|
|
# the BUILD_DIR is defined in the local cbox-dev.conf
|
|
|
|
|
IMAGE_DIR="$BUILD_DIR/image"
|
|
|
|
|
|
|
|
|
|
# read some cryptobox settings (especially "DEV_FEATURES_SCRIPT")
|
|
|
|
|
if [ -e "$TEMPLATE_DIR/etc/cryptobox/cryptobox.conf" ]
|
|
|
|
|
then source "$TEMPLATE_DIR/etc/cryptobox/cryptobox.conf"
|
|
|
|
|
else echo "cryptobox.conf ($TEMPLATE_DIR/etc/cryptobox/cryptobox.conf) does not exist!" >&2
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
####################### functions ######################
|
|
|
|
|
|
|
|
|
@ -141,6 +143,7 @@ function box_diff()
|
|
|
|
|
ssh -F "$SSH_CONFIG_FILE" "$SSH_HOST" "$DEV_FEATURES_SCRIPT" diff
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
############################# main #####################################
|
|
|
|
|
|
|
|
|
|
[ $# -eq 0 ] && echo "[`basename $0`] - no arguments supplied - maybe you want to use '--help'"
|
|
|
|
@ -160,6 +163,8 @@ case "$1" in
|
|
|
|
|
upload2box
|
|
|
|
|
;;
|
|
|
|
|
chroot )
|
|
|
|
|
# chroot may only be called as root
|
|
|
|
|
[ "$(id -u)" -ne 0 ] && echo "the action 'chroot' may only be called as root!" >&2 && exit 1
|
|
|
|
|
if [ ! -x "$IMAGE_DIR/$CHROOT_START" ]
|
|
|
|
|
then echo "the chroot init script ("$IMAGE_DIR/$CHROOT_START") is not executable"
|
|
|
|
|
echo "maybe you should run '`basename $0` cb-config' first"
|
|
|
|
@ -182,5 +187,4 @@ case "$1" in
|
|
|
|
|
$0 help
|
|
|
|
|
exit 1
|
|
|
|
|
;;
|
|
|
|
|
esac
|
|
|
|
|
esac
|
|
|
|
|