mirror of
https://github.com/rancher/os.git
synced 2025-08-02 07:24:28 +00:00
Merge pull request #343 from ibuildthecloud/fix-console
Make consoles compatible with RancherOS v0.3.0
This commit is contained in:
commit
d225141a44
@ -6,8 +6,8 @@ setup_ssh()
|
||||
for i in rsa dsa ecdsa ed25519; do
|
||||
local output=/etc/ssh/ssh_host_${i}_key
|
||||
if [ ! -e $output ]; then
|
||||
local saved="$(ros config get ssh.keys.${i})"
|
||||
local pub="$(ros config get ssh.keys.${i}-pub)"
|
||||
local saved="$(rancherctl config get ssh.keys.${i})"
|
||||
local pub="$(rancherctl config get ssh.keys.${i}-pub)"
|
||||
|
||||
if [[ -n "$saved" && -n "$pub" ]]; then
|
||||
(
|
||||
@ -17,8 +17,8 @@ setup_ssh()
|
||||
)
|
||||
else
|
||||
ssh-keygen -f $output -N '' -t $i
|
||||
ros config set -- ssh.keys.${i} "$(<${output})"
|
||||
ros config set -- ssh.keys.${i}-pub "$(<${output}.pub)"
|
||||
rancherctl config set -- ssh.keys.${i} "$(<${output})"
|
||||
rancherctl config set -- ssh.keys.${i}-pub "$(<${output}.pub)"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
@ -61,7 +61,7 @@ fi
|
||||
|
||||
setup_ssh
|
||||
|
||||
VERSION="$(ros -v | awk '{print $NF}')"
|
||||
VERSION="$(rancherctl -v | awk '{print $NF}')"
|
||||
cat > /etc/lsb-release << EOF
|
||||
DISTRIB_ID=RancherOS
|
||||
DISTRIB_RELEASE=${VERSION}
|
||||
|
@ -11,6 +11,7 @@ RUN locale-gen en_US.UTF-8
|
||||
RUN addgroup --gid 1100 rancher && \
|
||||
addgroup --gid 1101 docker && \
|
||||
useradd -u 1100 -g rancher -G docker,sudo -m -s /bin/bash rancher && \
|
||||
useradd -u 1101 -g docker -G docker,sudo -m -s /bin/bash docker && \
|
||||
echo '## allow password less for rancher user' >> /etc/sudoers && \
|
||||
echo 'rancher ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers && \
|
||||
echo 'docker ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
|
||||
|
@ -11,6 +11,7 @@ RUN locale-gen en_US.UTF-8
|
||||
RUN addgroup --gid 1100 rancher && \
|
||||
addgroup --gid 1101 docker && \
|
||||
useradd -u 1100 -g rancher -G docker,sudo -m -s /bin/bash rancher && \
|
||||
useradd -u 1101 -g docker -G docker,sudo -m -s /bin/bash docker && \
|
||||
echo '## allow password less for rancher user' >> /etc/sudoers && \
|
||||
echo 'rancher ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers && \
|
||||
echo 'docker ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
|
||||
|
Loading…
Reference in New Issue
Block a user