mirror of
https://github.com/rancher/os.git
synced 2025-06-27 15:26:50 +00:00
add os-release file for console container
This commit is contained in:
parent
954fc0043b
commit
8788ef3dfa
@ -75,6 +75,24 @@ if ! grep -q '^UseDNS no' /etc/ssh/sshd_config; then
|
|||||||
echo "UseDNS no" >> /etc/ssh/sshd_config
|
echo "UseDNS no" >> /etc/ssh/sshd_config
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
ID_TYPE="busybox"
|
||||||
|
if grep -q 'ID_LIKE=' /etc/os-release; then
|
||||||
|
ID_TYPE=$(grep 'ID_LIKE=' /etc/os-release | cut -d'=' -f2)
|
||||||
|
fi
|
||||||
|
|
||||||
|
cat > /etc/os-release << EOF
|
||||||
|
NAME="RancherOS"
|
||||||
|
VERSION=$VERSION
|
||||||
|
ID=rancheros
|
||||||
|
ID_LIKE=$ID_TYPE
|
||||||
|
VERSION_ID=$VERSION
|
||||||
|
PRETTY_NAME="RancherOS"
|
||||||
|
HOME_URL=
|
||||||
|
SUPPORT_URL=
|
||||||
|
BUG_REPORT_URL=
|
||||||
|
BUILD_ID=
|
||||||
|
EOF
|
||||||
|
|
||||||
if ! grep -q "$(hostname)" /etc/hosts; then
|
if ! grep -q "$(hostname)" /etc/hosts; then
|
||||||
echo 127.0.1.1 $(hostname) >> /etc/hosts
|
echo 127.0.1.1 $(hostname) >> /etc/hosts
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user