1
0
mirror of https://github.com/rancher/os.git synced 2025-09-17 07:30:42 +00:00

Merge pull request #302 from imikushin/ros

rename `rancherctl` to `ros`
This commit is contained in:
Darren Shepherd
2015-05-11 18:01:13 -07:00
6 changed files with 17 additions and 15 deletions

View File

@@ -145,7 +145,8 @@ func NewConfig() *Config {
"/init:/sbin/shutdown:ro",
"/init:/sbin/netconf:ro",
"/init:/usr/bin/cloud-init:ro",
"/init:/usr/bin/rancherctl:ro",
"/init:/usr/bin/rancherctl:ro", // deprecated, use `ros` instead
"/init:/usr/bin/ros:ro",
"/init:/usr/bin/respawn:ro",
"/init:/usr/bin/system-docker:ro",
"/init:/usr/sbin/wait-for-docker:ro",

View File

@@ -44,7 +44,8 @@ func main() {
registerCmd("/sbin/halt", power.Halt)
registerCmd("/sbin/shutdown", power.Main)
registerCmd("/usr/bin/respawn", respawn.Main)
registerCmd("/usr/sbin/rancherctl", control.Main)
registerCmd("/usr/sbin/rancherctl", control.Main) // deprecated, use `ros` instead
registerCmd("/usr/sbin/ros", control.Main)
registerCmd("/usr/bin/cloud-init", cloudinit.Main)
registerCmd("/usr/sbin/netconf", network.Main)
registerCmd("/usr/sbin/wait-for-docker", wait.Main)

View File

@@ -12,6 +12,6 @@ else
mount -t 9p -o trans=virtio,version=9p2000.L config-2 ${MOUNT_POINT} 2>/dev/null || true
fi
rancherctl config get cloud_init
ros config get cloud_init
cloud-init -save -network=${CLOUD_INIT_NETWORK:-true}

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="$(rancherctl config get ssh.keys.${i})"
local pub="$(rancherctl config get ssh.keys.${i}-pub)"
local saved="$(ros config get ssh.keys.${i})"
local pub="$(ros 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
rancherctl config set -- ssh.keys.${i} "$(<${output})"
rancherctl config set -- ssh.keys.${i}-pub "$(<${output}.pub)"
ros config set -- ssh.keys.${i} "$(<${output})"
ros config set -- ssh.keys.${i}-pub "$(<${output}.pub)"
fi
fi
done
@@ -61,7 +61,7 @@ fi
setup_ssh
VERSION="$(rancherctl -v | awk '{print $NF}')"
VERSION="$(ros -v | awk '{print $NF}')"
cat > /etc/lsb-release << EOF
DISTRIB_ID=RancherOS
DISTRIB_RELEASE=${VERSION}

View File

@@ -18,12 +18,12 @@ fi
rm -f /var/run/docker.pid
ARGS=$(echo $(rancherctl config get user_docker.args | sed 's/^-//'))
ARGS="$ARGS $(echo $(rancherctl config get user_docker.extra_args | sed 's/^-//'))"
ARGS=$(echo $(ros config get user_docker.args | sed 's/^-//'))
ARGS="$ARGS $(echo $(ros config get user_docker.extra_args | sed 's/^-//'))"
if [ "$(rancherctl config get user_docker.tls)" = "true" ]; then
ARGS="$ARGS $(echo $(rancherctl config get user_docker.tls_args | sed 's/^-//'))"
rancherctl tls generate --server -d $TLS_PATH
if [ "$(ros config get user_docker.tls)" = "true" ]; then
ARGS="$ARGS $(echo $(ros config get user_docker.tls_args | sed 's/^-//'))"
ros tls generate --server -d $TLS_PATH
cd $TLS_PATH
fi

View File

@@ -28,8 +28,8 @@ if [ "$(whoami)" != "root" ]; then
exit 1
fi
if [ -x /usr/bin/rancherctl ]; then
INSTALL_CONTAINER_IMAGE="$(rancherctl config get upgrade.image)"
if [ -x /usr/bin/ros ]; then
INSTALL_CONTAINER_IMAGE="$(ros config get upgrade.image)"
fi
if [ -n "$(grep RancherOS /etc/lsb-release)" ]; then