From 3a7fc4524d857e722a80bcc21f2c839538a11861 Mon Sep 17 00:00:00 2001 From: Darren Shepherd Date: Tue, 26 May 2015 21:00:06 -0700 Subject: [PATCH] Make consoles compatible with RancherOS v0.3.0 --- scripts/dockerimages/scripts/console.sh | 10 +++++----- scripts/extraimages/00-ubuntuconsole | 1 + scripts/extraimages/01-debianconsole | 1 + 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/scripts/dockerimages/scripts/console.sh b/scripts/dockerimages/scripts/console.sh index 8998ce7a..1ea72aed 100755 --- a/scripts/dockerimages/scripts/console.sh +++ b/scripts/dockerimages/scripts/console.sh @@ -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} diff --git a/scripts/extraimages/00-ubuntuconsole b/scripts/extraimages/00-ubuntuconsole index 1b5b8270..800b54e9 100644 --- a/scripts/extraimages/00-ubuntuconsole +++ b/scripts/extraimages/00-ubuntuconsole @@ -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 diff --git a/scripts/extraimages/01-debianconsole b/scripts/extraimages/01-debianconsole index 194fdc75..81b4c4f3 100644 --- a/scripts/extraimages/01-debianconsole +++ b/scripts/extraimages/01-debianconsole @@ -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