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
: >/etc/dms-settings # this file can be sourced by other scripts
local VAR
for VAR in "${!VARS[@]}"
do
echo "export ${VAR}='${VARS[${VAR}]}'" >>/root/.bashrc
echo "${VAR}='${VARS[${VAR}]}'" >>/etc/dms-settings
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