images moved to /var/www/cryptobox-img
doc pages served by the CGI again (as until rev 164) URLs of images in stylesheet are absolute now moved 'partition_info' layout to stylesheet file CGI: file handling now done with perl instead of shell utilities CGI: removed warning for 'crypto not mounted' after 'poweroff' or 'reboot' CGI: warning, if unmount-crypto failed CGI: warning, if configuration of any value failed silently texts for 'ConfigTimeOutFailed', 'ConfigLanguageFailed' and 'ConfigIPFailed' added to language file cbox-manage.sh: syntax info updated cbox-manage.sh: action 'crypto-(u)mount' renamed to 'crypto-up/down'
This commit is contained in:
parent
66c5d1955e
commit
16b5e2f07b
18 changed files with 131 additions and 79 deletions
|
@ -44,9 +44,6 @@ function initial_checks()
|
|||
{
|
||||
local device="$1"
|
||||
[ ! -b "$device" ] && log_msg "blockdevice $device does not exist" && return 1
|
||||
## check if we have an existing configpartition
|
||||
## TODO: why this config_mount_test?
|
||||
# config_mount_test "$device"
|
||||
[ ! -x "$WIPE" ] && log_msg "$WIPE not found" && return 1
|
||||
[ ! -x "$SFDISK" ] && log_msg "$SFDISK not found" && return 1
|
||||
for a in $ALGO $HASH
|
||||
|
@ -368,6 +365,12 @@ case "$ACTION" in
|
|||
/etc/init.d/samba stop
|
||||
/etc/init.d/thttpd stop
|
||||
;;
|
||||
crypto-up )
|
||||
mount_crypto
|
||||
;;
|
||||
crypto-down )
|
||||
umount_crypto
|
||||
;;
|
||||
box-init )
|
||||
# do complete initialization
|
||||
"$0" box-init-fg
|
||||
|
@ -400,16 +403,17 @@ case "$ACTION" in
|
|||
is_init_running )
|
||||
is_init_running
|
||||
;;
|
||||
is_harddisk_available )
|
||||
[ -z "$(find_harddisk)" ] && exit 1
|
||||
exit 0
|
||||
;;
|
||||
update_ip_address )
|
||||
# reconfigure the network interface to a new IP address
|
||||
# wait for 5 seconds to finish present http requests
|
||||
echo -n "sleep 5; ifconfig $NET_IFACE `config_get_value ip`" | at now
|
||||
;;
|
||||
crypto-mount )
|
||||
mount_crypto
|
||||
;;
|
||||
crypto-umount )
|
||||
umount_crypto
|
||||
get_current_ip )
|
||||
get_current_ip
|
||||
;;
|
||||
set_config )
|
||||
[ $# -ne 3 ] && error_msg 7 "'set_config' requires two parameters"
|
||||
|
@ -432,16 +436,30 @@ case "$ACTION" in
|
|||
log_msg "Rebooting the CryptoBox ..."
|
||||
echo "reboot" | at now
|
||||
;;
|
||||
get_current_ip )
|
||||
get_current_ip
|
||||
;;
|
||||
is_harddisk_available )
|
||||
[ -z "$(find_harddisk)" ] && exit 1
|
||||
exit 0
|
||||
;;
|
||||
* )
|
||||
# TODO: update this!
|
||||
echo "Syntax: `basename $0` { mount_config | umount_config | init }"
|
||||
echo "Syntax: `basename $0` ACTION [PARAMS]"
|
||||
echo " config-up - scan for configuration partition and mount it"
|
||||
echo " config-down - unmount configuration partition"
|
||||
echo " network-up - enable network interface"
|
||||
echo " network-down - disable network interface"
|
||||
echo " services-up - run some cryptobox specific daemons"
|
||||
echo " services-down - stop some cryptobox specific daemons"
|
||||
echo " crypto-up - mount crypto partition and start samba"
|
||||
echo " crypto-down - unmount crypto partition and stop samba"
|
||||
echo " box-init - initialize cryptobox (ALL data is LOST)"
|
||||
echo " box-init-fg - the first part of initialization"
|
||||
echo " box-init-bg - the last part of initialization (background)"
|
||||
echo " is_crypto_mounted - check, if crypto partition is mounted"
|
||||
echo " is_config_mounted - check, if configuration partition is mounted"
|
||||
echo " is_init_running - check, if initialization is ongoing"
|
||||
echo " is_harddisk_available - check, if there is a usable harddisk"
|
||||
echo " get_current_ip - get the current IP of the network interface"
|
||||
echo " update_ip_address - update the network interface after reconfiguration"
|
||||
echo " set_config NAME VALUE - change a configuration setting"
|
||||
echo " get_config NAME - retrieve a configuration setting"
|
||||
echo " diskinfo - show the partition table of the harddisk"
|
||||
echo " poweroff - shutdown the cryptobox"
|
||||
echo " reboot - reboot the cryptobox"
|
||||
echo
|
||||
;;
|
||||
esac
|
||||
|
|
|
@ -105,6 +105,21 @@ Lang {
|
|||
Text = Der ausgewählte Wert der Zeitabschaltung ist nicht gültig!
|
||||
}
|
||||
|
||||
ConfigTimeOutFailed {
|
||||
Title = Fehler beim Ändern der Zeitabschaltung
|
||||
Text = Der Wert der Zeitabschaltung konnte nicht geändert werden!
|
||||
}
|
||||
|
||||
ConfigLanguageFailed {
|
||||
Title = Fehler beim Ändern der Spracheinstellung
|
||||
Text = Die Sprach-Einstellung konnte nicht geändert werden!
|
||||
}
|
||||
|
||||
ConfigIPFailed {
|
||||
Title = Fehler beim Ändern der Netzwerkadresse
|
||||
Text = Die Netzwerkadresse konnte nicht geändert werden!
|
||||
}
|
||||
|
||||
IPAddressChanged {
|
||||
Title = Änderung der Netzwerk-Adresse
|
||||
Text = Die Netzwerk-Adresse der CryptoBox wurde verändert. In wenigen Sekunden werden sie zu der neuen Adresse umgeleitet.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="doc">
|
||||
|
||||
<?cs include:DocDir + '/' + Data.Doc.Page ?>
|
||||
<?cs include:DocDir + '/' + Data.Doc.Page + '.html' ?>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -19,8 +19,5 @@
|
|||
|
||||
<div class="partition_info">
|
||||
<h2><?cs var:Lang.Text.PartitionInfo ?></h2>
|
||||
<!-- TODO: CSS! -->
|
||||
<p style="margin-left:10%; margin-right:10%; font-family:monospace">
|
||||
<?cs var:Data.PartitionInfo ?>
|
||||
</p>
|
||||
<p><?cs var:Data.PartitionInfo ?></p>
|
||||
</div>
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
|
||||
<a href="<?cs call:getSelfURL('action=init_ask','action') ?>" title="Ersteinrichtung">Initialisierung</a>
|
||||
<a href="<?cs call:getSelfURL('action=show_log','action') ?>" title="Ereignis-Protokoll">Protokoll</a>
|
||||
<!-- TODO: language specific (weblang) doc-link -->
|
||||
<a href="/doc/CryptoBox.html" title="Nutzer-Handbuch">Hilfe</a>
|
||||
<a href="<?cs call:getSelfURL('action=doc&page=CryptoBox','action') ?>" title="Nutzer-Handbuch">Hilfe</a>
|
||||
<a href="<?cs call:getSelfURL('action=shutdown_ask','action') ?>" title="Herunterfahren">Herunterfahren</a>
|
||||
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 214 B |
Binary file not shown.
Before Width: | Height: | Size: 150 B |
Binary file not shown.
Before Width: | Height: | Size: 356 B |
Binary file not shown.
Before Width: | Height: | Size: 275 B |
Binary file not shown.
Before Width: | Height: | Size: 1.8 KiB |
Loading…
Add table
Add a link
Reference in a new issue