Fixed race condition for retain function in New Config

This commit is contained in:
bergware
2017-07-15 23:07:09 +02:00
parent 09aac41e66
commit 45810b9903
2 changed files with 20 additions and 15 deletions
+3 -3
View File
@@ -1,6 +1,6 @@
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2012-2016, Bergware International.
/* Copyright 2005-2017, Lime Technology
* Copyright 2012-2017, 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,
@@ -12,7 +12,7 @@
?>
<?
function preset($disk) {
return strpos($_POST['preset'],$disk['type'])!==false;
return strpos($_POST['preset'],$disk['type'])!==false && strpos($disk['status'],'_NP')===false;
}
@unlink('/boot/config/smart-one.cfg');