fixed bug, that would prevent re-initialization after reboot (stunnel.pem)

re-indentation
switches dfsbuild-host from "localhost" to "127.0.0.1" (in case of missing fstab)
This commit is contained in:
lars 2005-09-20 23:52:20 +00:00
parent 882b9d1bb7
commit 4c1d197472
3 changed files with 16 additions and 15 deletions

View file

@ -105,12 +105,12 @@ function create_config()
cp -a "$CONFIG_DEFAULTS_DIR/." "$CONFIG_DIR"
log_msg "Copying temporary cerificate file to config filesystem ..."
# beware: the temp file should always be there - even after reboot - see "mount_config"
cp -p "$CERT_TEMP" "$CERT_FILE"
log_msg "Setting inital values ..."
# beware: config_set_value remounts the config partition read-only
config_set_value "device" "$1"
config_set_value "ip" "$(get_current_ip)"
# reinitialise configuration
@ -221,6 +221,8 @@ function mount_config()
if [ -n "$device" ] && mount "${device}1" "$CONFIG_DIR"
then log_msg "configuraton found on $device"
config_set_value "device" "$device"
# copy certificate to /tmp in case of re-initialization
cp "$CERT_FILE" "$CERT_TEMP"
return 0
else log_msg "failed to locate harddisk"
return 1
@ -319,8 +321,6 @@ ACTION=help
case "$ACTION" in
config-up )
# the "cruft" option could help to prevent the error "interleaved files not (yet) supported"
mount -o remount,cruft /
if mount_config
then echo "Cryptobox configuration successfully loaded"
else error_msg 3 "Could not find a configuration partition!"