improve: sort environment variables (#2298)

This commit is contained in:
Casper 2021-11-13 21:11:44 +01:00 committed by GitHub
parent 65120dd934
commit cac0647250
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -77,12 +77,16 @@ function _setup_default_vars
: >/root/.bashrc # make DMS variables available in login shells and their subprocesses : >/root/.bashrc # make DMS variables available in login shells and their subprocesses
: >/etc/dms-settings # this file can be sourced by other scripts : >/etc/dms-settings # this file can be sourced by other scripts
local VAR local VAR
for VAR in "${!VARS[@]}" for VAR in "${!VARS[@]}"
do do
echo "export ${VAR}='${VARS[${VAR}]}'" >>/root/.bashrc echo "export ${VAR}='${VARS[${VAR}]}'" >>/root/.bashrc
echo "${VAR}='${VARS[${VAR}]}'" >>/etc/dms-settings echo "${VAR}='${VARS[${VAR}]}'" >>/etc/dms-settings
done done
sort -o /root/.bashrc /root/.bashrc
sort -o /etc/dms-settings /etc/dms-settings
} }
# File/folder permissions are fine when using docker volumes, but may be wrong # File/folder permissions are fine when using docker volumes, but may be wrong