mirror of
https://github.com/unraid/webgui.git
synced 2026-04-30 06:49:24 -05:00
Remove SMART config files when "New Config" is done
prevent outdated assignments
This commit is contained in:
@@ -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');
|
||||
?>
|
||||
Reference in New Issue
Block a user