rc: smoothen tools.git usage

Plugins throw errors where none should exist.  Was already
fixed in rc.configure_firmware...

While here, switch if and exec calls, we don't need sync if
we are not going to run.
This commit is contained in:
Franco Fichtner 2018-04-29 15:28:31 +02:00
parent 130c2a8bb6
commit 6c724e4933
2 changed files with 8 additions and 3 deletions

View File

@ -27,14 +27,14 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
/* there seems to be a race with unpacking files */
shell_exec('/bin/sync');
/* abort in case of no valid config for image install */
if (!file_exists('/conf/config.xml')) {
exit(0);
}
/* there seems to be a race with unpacking files */
shell_exec('/bin/sync');
require_once 'config.inc';
require_once 'auth.inc';
require_once 'util.inc';

View File

@ -27,6 +27,11 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
/* abort in case of no valid config for image install */
if (!file_exists('/conf/config.xml')) {
exit(0);
}
require_once 'config.inc';
require_once 'system.inc';
require_once 'interfaces.inc';