mirror of
https://github.com/actions/runner-images.git
synced 2025-12-14 13:17:54 +00:00
[Ubuntu] Add a file with global user-related variables and point BASH_ENV variable to it (#2826)
* Add global vars to profile.d * set BASH_ENV var * fix comment * remove extra quotes
This commit is contained in:
@@ -4,9 +4,14 @@
|
||||
echo ImageVersion=$IMAGE_VERSION | tee -a /etc/environment
|
||||
echo ImageOS=$IMAGE_OS | tee -a /etc/environment
|
||||
|
||||
# Create a file to store user-related global environment variables
|
||||
touch /etc/profile.d/env_vars.sh
|
||||
# Set BASH_ENV variable pointed to the file with user-related global environment variables for non-interactive sessions
|
||||
echo "BASH_ENV=/etc/profile.d/env_vars.sh" | tee -a /etc/environment
|
||||
|
||||
# This directory is supposed to be created in $HOME and owned by user(https://github.com/actions/virtual-environments/issues/491)
|
||||
mkdir -p /etc/skel/.config/configstore
|
||||
echo 'export XDG_CONFIG_HOME=$HOME/.config' | tee -a /etc/skel/.bashrc
|
||||
echo 'export XDG_CONFIG_HOME=$HOME/.config' | tee -a /etc/profile.d/env_vars.sh
|
||||
|
||||
# Change waagent entries to use /mnt for swapfile
|
||||
sed -i 's/ResourceDisk.Format=n/ResourceDisk.Format=y/g' /etc/waagent.conf
|
||||
|
||||
Reference in New Issue
Block a user