summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xfrontend/lb31
1 files changed, 15 insertions, 16 deletions
diff --git a/frontend/lb b/frontend/lb
index 0ebcc200e..43b822fcb 100755
--- a/frontend/lb
+++ b/frontend/lb
@@ -42,22 +42,6 @@ esac
COMMAND="${1}"
shift
-ENV=""
-
-if [ "${COMMAND}" != "config" ]; then
- # Checking user account
- if [ "$(id -u)" -ne "0" ]; then
- Echo_error "Root privileges needed!"
- exit 1
- fi
-fi
-
-for _FILE in config/environment config/environment.binary; do
- if [ -e "${_FILE}" ]; then
- ENV="${ENV} $(grep -v '^#' ${_FILE})"
- fi
-done
-
if [ -x "${LIVE_BUILD}/scripts/build/${COMMAND}" ]; then
# User has live-build copied locally in the system
SCRIPT="${LIVE_BUILD}/scripts/build/${COMMAND}"
@@ -75,6 +59,21 @@ else
exit 1
fi
+if [ "${COMMAND}" != "config" ]; then
+ # Checking user account
+ if [ "$(id -u)" -ne "0" ]; then
+ Echo_error "Root privileges needed!"
+ exit 1
+ fi
+fi
+
+ENV=""
+for _FILE in config/environment config/environment.binary; do
+ if [ -e "${_FILE}" ]; then
+ ENV="${ENV} $(grep -v '^#' ${_FILE})"
+ fi
+done
+
_CMD_LABEL="lb ${COMMAND}"
if [ "${_COLOR_OUT}" = "true" ]; then
_CMD_LABEL="${CYAN}${_CMD_LABEL}${NO_COLOR}"