|
|
|
@ -169,11 +169,6 @@ sub umount_vol
|
|
|
|
|
# TODO: check if "system" returns output
|
|
|
|
|
my $output = `$CB_SCRIPT crypto-umount`;
|
|
|
|
|
$pagedata->setValue('Data.ProgOutput',"$output") if ($output);
|
|
|
|
|
|
|
|
|
|
if (!&check_mounted()) {
|
|
|
|
|
$pagedata->setValue('Data.Warning', 'UmountFailed');
|
|
|
|
|
$pagedata->setValue('Data.Action', 'mount_form');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -226,6 +221,11 @@ if ( ! &check_ssl()) {
|
|
|
|
|
} else {
|
|
|
|
|
# unmounten
|
|
|
|
|
&umount_vol();
|
|
|
|
|
if (&check_mounted()) {
|
|
|
|
|
$pagedata->setValue('Data.Warning', 'UmountFailed');
|
|
|
|
|
$pagedata->setValue('Data.Action', 'umount_form');
|
|
|
|
|
}
|
|
|
|
|
$pagedata->setValue('Data.Success', 'UmountDone');
|
|
|
|
|
$pagedata->setValue('Data.Action', 'mount_form');
|
|
|
|
|
}
|
|
|
|
|
################ mount_do ########################
|
|
|
|
@ -251,6 +251,7 @@ if ( ! &check_ssl()) {
|
|
|
|
|
$pagedata->setValue('Data.Warning', 'MountFailed');
|
|
|
|
|
$pagedata->setValue('Data.Action', 'mount_form');
|
|
|
|
|
} else {
|
|
|
|
|
$pagedata->setValue('Data.Success', 'MountDone');
|
|
|
|
|
$pagedata->setValue('Data.Action', 'umount_form');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -307,7 +308,12 @@ if ( ! &check_ssl()) {
|
|
|
|
|
} else {
|
|
|
|
|
# do init
|
|
|
|
|
&box_init($query->param('password'));
|
|
|
|
|
$pagedata->setValue('Data.Action', 'config_form');
|
|
|
|
|
if (!&check_init_running()) {
|
|
|
|
|
$pagedata->setValue('Data.Error', 'InitFailed');
|
|
|
|
|
} else {
|
|
|
|
|
$pagedata->setValue('Data.Success', 'InitRunning');
|
|
|
|
|
$pagedata->setValue('Data.Action', 'config_form');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
#################### config_ask ######################
|
|
|
|
|
} elsif ($action eq 'config_ask') {
|
|
|
|
@ -342,6 +348,8 @@ if ( ! &check_ssl()) {
|
|
|
|
|
system("$CB_SCRIPT", "set_config", "language", $query->param('language'));
|
|
|
|
|
system("$CB_SCRIPT", "set_config", "timeout", $query->param('timeout'));
|
|
|
|
|
system("$CB_SCRIPT", "set_config", "ip", $query->param('ip'));
|
|
|
|
|
# TODO: check for success by comparing with new config and report success
|
|
|
|
|
$pagedata->setValue('Data.Success', 'ConfigSaved');
|
|
|
|
|
$pagedata->setValue('Data.Action', 'intro');
|
|
|
|
|
}
|
|
|
|
|
#################### show_log ########################
|
|
|
|
|