mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-20 06:29:50 +00:00
[Ubuntu] Set user-related environmental variables and PATH via post deployment script (#3030)
* Move home directory vars to post-deploy scripts * Remove "export" word * Move home directory vars to post-deploy scripts * Remove "export" word * add variables via post-deployment file * remove quotes around PATH * remove quotes * Replace $HOME in /etc/environment in post-deployment script * rename variable * get rid of extra variable
This commit is contained in:
6
images/linux/post-generation/environment-variables.sh
Normal file
6
images/linux/post-generation/environment-variables.sh
Normal file
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Replace $HOME with the default user's home directory for environmental variables related to the default user home directory
|
||||
|
||||
homeDir=$(cut -d: -f6 /etc/passwd | tail -1)
|
||||
sed -i "s|\$HOME|$homeDir|g" /etc/environment
|
||||
Reference in New Issue
Block a user