Remove SMART config files when "New Config" is done

prevent outdated assignments
This commit is contained in:
bergware
2016-06-19 07:11:00 +02:00
parent 4c44bc5c21
commit 56c575342f
2 changed files with 23 additions and 2 deletions
+7 -2
View File
@@ -13,6 +13,11 @@ Title="New Config"
* all copies or substantial portions of the Software.
*/
?>
<script>
function deleteSmartCfg() {
$.get('/webGui/include/DeleteSmartCfg.php');
}
</script>
This is a utility to reset the array disk configuration so that all disks appear as "New" disks, as
if it were a fresh new server.
@@ -26,6 +31,6 @@ effect of making it ***impossible*** to rebuild an existing failed drive - you h
<?if ($var['fsState']=="Started"):?>
<input type="submit" name="cmdInit" value="Apply" disabled><input type="button" value="Done" onclick="done()">Array must be <strong><big>stopped</big></strong>
<?else:?>
<input type="submit" name="cmdInit" value="Apply" disabled><input type="button" value="Done" onclick="done()"><input type="checkbox" onClick="cmdInit.disabled=!this.checked"><small>Yes I want to do this</small>
<input type="submit" name="cmdInit" value="Apply" onclick="deleteSmartCfg()" disabled><input type="button" value="Done" onclick="done()"><input type="checkbox" onClick="cmdInit.disabled=!this.checked"><small>Yes I want to do this</small>
<?endif;?>
</form>
</form>
@@ -0,0 +1,16 @@
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*/
?>
<?
@unlink('/boot/config/smart-one.cfg');
@unlink('/boot/config/smart-all.cfg');
?>