mirror of
https://github.com/rancher/os.git
synced 2025-08-17 14:28:16 +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
|
fi
|
||||||
|
|
||||||
ID_TYPE="busybox"
|
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)
|
ID_TYPE=$(grep 'ID_LIKE=' /etc/os-release | cut -d'=' -f2)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user