mirror of
https://github.com/rancher/os.git
synced 2025-08-01 23:17:50 +00:00
Check if os-release exists first
This commit is contained in:
parent
6bb6fb0eec
commit
61b5525d5b
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user