diff options
author | Kiel Christofferson <kiel@endpoint.com> | 2013-11-15 16:13:32 -0500 |
---|---|---|
committer | Daniel Baumann <mail@daniel-baumann.ch> | 2014-03-02 06:22:19 +0100 |
commit | c8daf8fcfd4c7d3747b0c44eb9b82fa4ee3167d5 (patch) | |
tree | fff7726cbaac54f51bd77ef71a0fb4b3d3cbe2b0 /frontend/cli | |
parent | c9a09a282c0b17ac2a922adc920369844fa9adeb (diff) | |
download | vyos-live-build-c8daf8fcfd4c7d3747b0c44eb9b82fa4ee3167d5.tar.gz vyos-live-build-c8daf8fcfd4c7d3747b0c44eb9b82fa4ee3167d5.zip |
Allow config command without root privileges.
Diffstat (limited to 'frontend/cli')
-rwxr-xr-x | frontend/cli/lb | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/frontend/cli/lb b/frontend/cli/lb index 18bb9cdd2..63e46a9e0 100755 --- a/frontend/cli/lb +++ b/frontend/cli/lb @@ -18,13 +18,6 @@ DESCRIPTION="$(Echo 'utility to build live systems')" HELP="FIXME" USAGE="FIXME" -# Checking user account -if [ "$(id -u)" -ne "0" ] -then - Echo_error "need root privileges" - exit 1 -fi - case "${1}" in -h|--help) if [ -x "$(which man 2>/dev/null)" ] @@ -52,6 +45,16 @@ case "${1}" in ENV="" + if [ "${COMMAND}" != "config" ] + then + # Checking user account + if [ "$(id -u)" -ne "0" ] + then + Echo_error "need root privileges" + exit 1 + fi + fi + for _FILE in config/environment config/environment.binary do if [ -e "${_FILE}" ] |