1
0
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:
Darren Shepherd 2015-05-29 11:27:45 -07:00
commit d225141a44
3 changed files with 7 additions and 5 deletions

View File

@ -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}

View File

@ -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

View File

@ -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