mirror of
https://github.com/rancher/os.git
synced 2025-09-07 01:31:06 +00:00
Check if os-release exists first
This commit is contained in:
@@ -76,7 +76,7 @@ if ! grep -q '^UseDNS no' /etc/ssh/sshd_config; then
|
||||
fi
|
||||
|
||||
ID_TYPE="busybox"
|
||||
if grep -q 'ID_LIKE=' /etc/os-release; then
|
||||
if [ -e /etc/os-release ] && grep -q 'ID_LIKE=' /etc/os-release; then
|
||||
ID_TYPE=$(grep 'ID_LIKE=' /etc/os-release | cut -d'=' -f2)
|
||||
fi
|
||||
|
||||
|
Reference in New Issue
Block a user