From 6c724e49336e21d4cd674269498aab1e7bca6b33 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Sun, 29 Apr 2018 15:28:31 +0200 Subject: [PATCH] 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. --- src/etc/rc.configure_firmware | 6 +++--- src/etc/rc.configure_plugins | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/etc/rc.configure_firmware b/src/etc/rc.configure_firmware index ffbffac27..ffd8cfe54 100755 --- a/src/etc/rc.configure_firmware +++ b/src/etc/rc.configure_firmware @@ -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'; diff --git a/src/etc/rc.configure_plugins b/src/etc/rc.configure_plugins index 7d8b75281..727aed971 100755 --- a/src/etc/rc.configure_plugins +++ b/src/etc/rc.configure_plugins @@ -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';