diff --git a/cbox-tree.d/usr/share/cryptobox/lang/de.hdf b/cbox-tree.d/usr/share/cryptobox/lang/de.hdf index 5a9c636..888e16c 100644 --- a/cbox-tree.d/usr/share/cryptobox/lang/de.hdf +++ b/cbox-tree.d/usr/share/cryptobox/lang/de.hdf @@ -11,6 +11,7 @@ Lang { Config = Konfiguration der CryptoBox Log = Protokoll der CryptoBox ShutDown = System + Status = Status der CryptoBox } @@ -35,6 +36,8 @@ Lang { DoUmount = Deaktivierung des verschlüsselten Dateisystems DoMount = Aktivierung des verschlüsselten Dateisystems Configuration = Einstellungen + CryptoIsActive = Die Crypto-Daten sind verfügbar. + CryptoIsDown = Die Crypto-Daten sind vor jedem Zugriff geschützt. } @@ -49,6 +52,7 @@ Lang { ReBoot = neu starten Protocol = Protokoll Documentation = Handbuch + Status = Status } diff --git a/cbox-tree.d/usr/share/cryptobox/lang/en.hdf b/cbox-tree.d/usr/share/cryptobox/lang/en.hdf index 5edd3a5..de514c6 100644 --- a/cbox-tree.d/usr/share/cryptobox/lang/en.hdf +++ b/cbox-tree.d/usr/share/cryptobox/lang/en.hdf @@ -11,6 +11,7 @@ Lang { Config = CryptoBox configuration Log = CryptoBox logfiles ShutDown = System + Status = Status } @@ -35,6 +36,8 @@ Lang { DoUmount = Deactivation of the encrypted filesystem DoMount = Activation of the encrypted filesystem Configuration = Configuration + CryptoIsActive = The encrypted data is accessible. + CryptoIsDown = The encrypted data is protected from any access. } @@ -49,6 +52,7 @@ Lang { ReBoot = Reboot Protocol = Logfiles Documentation = Manual + Status = Status } diff --git a/cbox-tree.d/usr/share/cryptobox/lang/si.hdf b/cbox-tree.d/usr/share/cryptobox/lang/si.hdf index 822ba36..319960e 100644 --- a/cbox-tree.d/usr/share/cryptobox/lang/si.hdf +++ b/cbox-tree.d/usr/share/cryptobox/lang/si.hdf @@ -11,6 +11,7 @@ Lang { Config = CryptoBox konfiguracija Log = CryptoBox dnevnik ShutDown = Ugasni + Status = Stanje } @@ -35,6 +36,8 @@ Lang { DoUmount = Deaktivacija kriptiranega datotečnega sistema DoMount = Aktivacija kriptiranega datotečnega sistema Configuration = Konfiguracija + CryptoIsActive = The encrypted data is accessible. + CryptoIsDown = The encrypted data is protected from any access. } @@ -49,6 +52,7 @@ Lang { ReBoot = Ponovni zagon Protocol = Dnevnik Documentation = Priročnik + Status = Stanje } diff --git a/cbox-tree.d/usr/share/cryptobox/templates/empty.cs b/cbox-tree.d/usr/share/cryptobox/templates/empty.cs new file mode 100644 index 0000000..fa14cb9 --- /dev/null +++ b/cbox-tree.d/usr/share/cryptobox/templates/empty.cs @@ -0,0 +1 @@ + diff --git a/cbox-tree.d/usr/share/cryptobox/templates/footer.cs b/cbox-tree.d/usr/share/cryptobox/templates/footer.cs index 060f2d3..6a5b4de 100644 --- a/cbox-tree.d/usr/share/cryptobox/templates/footer.cs +++ b/cbox-tree.d/usr/share/cryptobox/templates/footer.cs @@ -1,5 +1,5 @@ - -

+ +

diff --git a/cbox-tree.d/usr/share/cryptobox/templates/header.cs b/cbox-tree.d/usr/share/cryptobox/templates/header.cs index 83c4140..a8ddd4a 100644 --- a/cbox-tree.d/usr/share/cryptobox/templates/header.cs +++ b/cbox-tree.d/usr/share/cryptobox/templates/header.cs @@ -8,7 +8,8 @@ - + diff --git a/cbox-tree.d/usr/share/cryptobox/templates/nav.cs b/cbox-tree.d/usr/share/cryptobox/templates/nav.cs index 847f7f0..4ce8b29 100644 --- a/cbox-tree.d/usr/share/cryptobox/templates/nav.cs +++ b/cbox-tree.d/usr/share/cryptobox/templates/nav.cs @@ -4,6 +4,7 @@ + diff --git a/cbox-tree.d/usr/share/cryptobox/templates/status.cs b/cbox-tree.d/usr/share/cryptobox/templates/status.cs new file mode 100644 index 0000000..a2e8439 --- /dev/null +++ b/cbox-tree.d/usr/share/cryptobox/templates/status.cs @@ -0,0 +1,3 @@ +

+

+

diff --git a/cbox-tree.d/var/www/cgi-bin/cryptobox.pl b/cbox-tree.d/var/www/cgi-bin/cryptobox.pl index d1e96db..ca5be94 100755 --- a/cbox-tree.d/var/www/cgi-bin/cryptobox.pl +++ b/cbox-tree.d/var/www/cgi-bin/cryptobox.pl @@ -311,10 +311,12 @@ if ( ! &check_ssl()) { $pagedata->setValue('Data.Action', 'init_form'); } elsif (&check_init_running()) { $pagedata->setValue('Data.Warning', 'InitNotFinished'); - $pagedata->setValue('Data.Action', 'mount_form'); + $pagedata->setValue('Data.Action', 'empty'); + $pagedata->setValue('Data.Redirect.Action', 'config_form'); + $pagedata->setValue('Data.Redirect.Delay', "30"); } elsif ( ! &check_mounted()) { $pagedata->setValue('Data.Warning', 'NotMounted'); - $pagedata->setValue('Data.Action', 'mount_form'); + $pagedata->setValue('Data.Action', 'empty'); } else { # unmounten &umount_vol(); @@ -323,7 +325,9 @@ if ( ! &check_ssl()) { $pagedata->setValue('Data.Action', 'umount_form'); } else { $pagedata->setValue('Data.Success', 'UmountDone'); - $pagedata->setValue('Data.Action', 'mount_form'); + $pagedata->setValue('Data.Action', 'status'); + $pagedata->setValue('Data.Redirect.Action', 'status'); + $pagedata->setValue('Data.Redirect.Delay', "60"); } } ################ mount_do ######################## @@ -334,10 +338,14 @@ if ( ! &check_ssl()) { $pagedata->setValue('Data.Action', 'init_form'); } elsif (&check_init_running()) { $pagedata->setValue('Data.Warning', 'InitNotFinished'); - $pagedata->setValue('Data.Action', 'mount_form'); + $pagedata->setValue('Data.Action', 'empty'); + $pagedata->setValue('Data.Redirect.Action', 'config_form'); + $pagedata->setValue('Data.Redirect.Delay', "30"); } elsif (&check_mounted()) { $pagedata->setValue('Data.Warning', 'IsMounted'); - $pagedata->setValue('Data.Action', 'umount_form'); + $pagedata->setValue('Data.Action', 'empty'); + $pagedata->setValue('Data.Redirect.Action', 'status'); + $pagedata->setValue('Data.Redirect.Delay', "30"); } elsif ($query->param('crypto_password') eq '') { # leeres Passwort $pagedata->setValue('Data.Warning', 'EmptyCryptoPassword'); @@ -350,7 +358,9 @@ if ( ! &check_ssl()) { $pagedata->setValue('Data.Action', 'mount_form'); } else { $pagedata->setValue('Data.Success', 'MountDone'); - $pagedata->setValue('Data.Action', 'umount_form'); + $pagedata->setValue('Data.Action', 'empty'); + $pagedata->setValue('Data.Redirect.Action', 'status'); + $pagedata->setValue('Data.Redirect.Delay', "30"); } } ################## mount_ask ####################### @@ -360,10 +370,14 @@ if ( ! &check_ssl()) { $pagedata->setValue('Data.Action', 'init_form'); } elsif (&check_init_running()) { $pagedata->setValue('Data.Warning', 'InitNotFinished'); - $pagedata->setValue('Data.Action', 'mount_form'); + $pagedata->setValue('Data.Action', 'empty'); + $pagedata->setValue('Data.Redirect.Action', 'config_form'); + $pagedata->setValue('Data.Redirect.Delay', "30"); } elsif (&check_mounted()) { $pagedata->setValue('Data.Warning', 'IsMounted'); - $pagedata->setValue('Data.Action', 'umount_form'); + $pagedata->setValue('Data.Action', 'empty'); + $pagedata->setValue('Data.Redirect.Action', 'status'); + $pagedata->setValue('Data.Redirect.Delay', "30"); } else { $pagedata->setValue('Data.Action', 'mount_form'); } @@ -374,7 +388,9 @@ if ( ! &check_ssl()) { $pagedata->setValue('Data.Action', 'init_form'); } elsif ( ! &check_mounted()) { $pagedata->setValue('Data.Warning', 'NotMounted'); - $pagedata->setValue('Data.Action', 'mount_form'); + $pagedata->setValue('Data.Action', 'empty'); + $pagedata->setValue('Data.Redirect.Action', 'status'); + $pagedata->setValue('Data.Redirect.Delay', "30"); } else { $pagedata->setValue('Data.Action', 'umount_form'); } @@ -475,11 +491,9 @@ if ( ! &check_ssl()) { } else { $pagedata->setValue('Data.Success', 'ConfigSaved'); } - if (&check_mounted()) { - $pagedata->setValue('Data.Action', 'umount_form'); - } else { - $pagedata->setValue('Data.Action', 'mount_form'); - } + $pagedata->setValue('Data.Action', 'status'); + $pagedata->setValue('Data.Redirect.Action', 'status'); + $pagedata->setValue('Data.Redirect.Delay', "30"); } } #################### show_log ####################### @@ -502,12 +516,28 @@ if ( ! &check_ssl()) { if ($query->param('type') eq 'reboot') { &system_reboot(); $pagedata->setValue('Data.Success', 'ReBoot'); + $pagedata->setValue('Data.Redirect.Action', 'status'); + $pagedata->setValue('Data.Redirect.Delay', "180"); } else { &system_poweroff(); $pagedata->setValue('Data.Success', 'PowerOff'); } - $pagedata->setValue('Data.Doc.Page', 'CryptoBoxIntro'); - $pagedata->setValue('Data.Action', 'doc'); + $pagedata->setValue('Data.Action', 'empty'); + #################### status ######################### + } elsif ($action eq 'status') { + if ( ! &check_config()) { + $pagedata->setValue('Data.Warning', 'NotInitialized'); + $pagedata->setValue('Data.Action', 'init_form'); + } elsif (&check_init_running()) { + $pagedata->setValue('Data.Warning', 'InitNotFinished'); + $pagedata->setValue('Data.Action', 'empty'); + $pagedata->setValue('Data.Redirect.Action', 'config_form'); + $pagedata->setValue('Data.Redirect.Delay', "30"); + } else { + $pagedata->setValue('Data.Action', 'status'); + $pagedata->setValue('Data.Redirect.Action', 'status'); + $pagedata->setValue('Data.Redirect.Delay', "60"); + } ################### unknown ######################### } else { $pagedata->setValue('Data.Error', 'UnknownAction'); @@ -515,14 +545,14 @@ if ( ! &check_ssl()) { ###################### default ########################## } else { if (&check_init_running()) { - $pagedata->setValue('Data.Doc.Page', 'CryptoBoxIntro'); - $pagedata->setValue('Data.Action', 'doc'); + $pagedata->setValue('Data.Warning', 'InitNotFinished'); + $pagedata->setValue('Data.Action', 'empty'); + $pagedata->setValue('Data.Redirect.Action', 'config_form'); + $pagedata->setValue('Data.Redirect.Delay', "60"); } elsif (&check_config()) { - if (&check_mounted()) { - $pagedata->setValue('Data.Action', 'umount_form'); - } else { - $pagedata->setValue('Data.Action', 'mount_form'); - } + $pagedata->setValue('Data.Action', 'status'); + $pagedata->setValue('Data.Redirect.Action', 'status'); + $pagedata->setValue('Data.Redirect.Delay', "60"); } else { $pagedata->setValue('Data.Action', 'init_form'); }