Daemons now start up correctly on their own.
Volumes can now be mounted, unmounted, and accessed using CIFS, including encrypted volumes. Streamlined build customization capability, including addition of "scoreboard" file. Added live-helper scripts to the repository.
This commit is contained in:
parent
443dd1f163
commit
13e8c341a1
13 changed files with 584 additions and 40 deletions
|
@ -1,21 +1,72 @@
|
|||
#!/bin/sh
|
||||
#CryptoNAS Live include file
|
||||
#$BUILD_DIR/config/cnas-active-settings
|
||||
# -*- bash -*- #configure Emacs for bash mode
|
||||
#This file includes the config files in the correct order.
|
||||
#It can be included by scripts both in the bootstrap and
|
||||
#chroot environments. Variable assignments in later
|
||||
#includes override earlier ones.
|
||||
#This file also contains a hack to write the scoreboard
|
||||
#file.
|
||||
|
||||
# Variable and function names starting with underscore
|
||||
# are NOT intended to be used for user customization of builds.
|
||||
# In addition, the names of variables to be included in the
|
||||
# scoreboard file must begin with "CNAS_".
|
||||
|
||||
. ./cnas-default-settings
|
||||
#This file is included by:
|
||||
# config/common
|
||||
# config/bootstrap
|
||||
# config/chroot
|
||||
# config/binary
|
||||
# config/source
|
||||
|
||||
CNAS_CONFIG_DIR="config"
|
||||
|
||||
. ${CNAS_CONFIG_DIR}/cnas-default-settings
|
||||
|
||||
#May be necessary to include this file in the below files instead...
|
||||
#. ./common
|
||||
#. ./bootstrap
|
||||
#. ./chroot
|
||||
#. ./binary
|
||||
#. ./source
|
||||
|
||||
#Include cnas-custom-settings IFF this file exists
|
||||
#. ./cnas-custom-settings
|
||||
[ -f ./cnas-custom-settings ] && . ./cnas-custom-settings
|
||||
[ -f ${CNAS_CONFIG_DIR}/cnas-custom-settings ] && . ${CNAS_CONFIG_DIR}/cnas-custom-settings
|
||||
|
||||
|
||||
#The stage file tracks when the scoreboard update code
|
||||
#needs to run. The path is relative to the build dir.
|
||||
_CNAS_STAGE_DIR=".stage/"
|
||||
_CNAS_STAGE=".stage/chroot_cnas-scoreboard"
|
||||
|
||||
|
||||
#Search in the top level of config for settings files CryptoNAS
|
||||
#depends on. If any of them changed more recently than
|
||||
#the settings scoreboard file, update it.
|
||||
_CNAS_FIND="find config -regextype posix-extended -maxdepth 1 -type f -newer ${_CNAS_STAGE} -true "
|
||||
|
||||
#FIXME: refine regexp, try remembering during a rebuild...?
|
||||
# -regex '[^~]+' "
|
||||
# \( -name 'common -o -name 'bootstrap' -o -name 'chroot' -o -name 'binary' -o -name 'source' -o -name 'cnas-default-settings' -o -name 'cnas-custom-settings' -o -name 'cnas-active-settings' \) "
|
||||
#echo ${_CNAS_FIND}
|
||||
#_CNAS_FOUND=`${_CNAS_FIND}`
|
||||
|
||||
|
||||
_CNAS_SCOREBOARD="config/chroot_local-includes/usr/lib/cryptobox-cd/etc-scoreboard"
|
||||
|
||||
#Only run the scoreboard hack if the ".stage" directory exists
|
||||
if [ -d ${_CNAS_STAGE_DIR} ]
|
||||
then
|
||||
#If the scoreboard file needs updating, update it:
|
||||
|
||||
#If the stage file does not exist or the "find" found something
|
||||
if [ ! -f "${_CNAS_STAGE}" ] || [ -n "`${_CNAS_FIND}`" ]
|
||||
then
|
||||
#Update the scoreboard file from the current shell vars
|
||||
echo "CryptoNAS: updating scoreboard file..."
|
||||
set | grep -e "^CNAS_" > ${_CNAS_SCOREBOARD}
|
||||
|
||||
#If we updated the scoreboard, touch the .stage/...
|
||||
#file we use for time stamping.
|
||||
touch "${_CNAS_STAGE}"
|
||||
fi
|
||||
|
||||
fi # .stage directory exists
|
||||
|
||||
#Unconditionally return success
|
||||
/bin/true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue