1
0
mirror of https://github.com/rancher/os.git synced 2025-09-17 15:40:47 +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/shutdown:ro",
"/init:/sbin/netconf:ro", "/init:/sbin/netconf:ro",
"/init:/usr/bin/cloud-init: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/respawn:ro",
"/init:/usr/bin/system-docker:ro", "/init:/usr/bin/system-docker:ro",
"/init:/usr/sbin/wait-for-docker:ro", "/init:/usr/sbin/wait-for-docker:ro",

View File

@@ -44,7 +44,8 @@ func main() {
registerCmd("/sbin/halt", power.Halt) registerCmd("/sbin/halt", power.Halt)
registerCmd("/sbin/shutdown", power.Main) registerCmd("/sbin/shutdown", power.Main)
registerCmd("/usr/bin/respawn", respawn.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/bin/cloud-init", cloudinit.Main)
registerCmd("/usr/sbin/netconf", network.Main) registerCmd("/usr/sbin/netconf", network.Main)
registerCmd("/usr/sbin/wait-for-docker", wait.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 mount -t 9p -o trans=virtio,version=9p2000.L config-2 ${MOUNT_POINT} 2>/dev/null || true
fi fi
rancherctl config get cloud_init ros config get cloud_init
cloud-init -save -network=${CLOUD_INIT_NETWORK:-true} cloud-init -save -network=${CLOUD_INIT_NETWORK:-true}

View File

@@ -6,8 +6,8 @@ setup_ssh()
for i in rsa dsa ecdsa ed25519; do for i in rsa dsa ecdsa ed25519; do
local output=/etc/ssh/ssh_host_${i}_key local output=/etc/ssh/ssh_host_${i}_key
if [ ! -e $output ]; then if [ ! -e $output ]; then
local saved="$(rancherctl config get ssh.keys.${i})" local saved="$(ros config get ssh.keys.${i})"
local pub="$(rancherctl config get ssh.keys.${i}-pub)" local pub="$(ros config get ssh.keys.${i}-pub)"
if [[ -n "$saved" && -n "$pub" ]]; then if [[ -n "$saved" && -n "$pub" ]]; then
( (
@@ -17,8 +17,8 @@ setup_ssh()
) )
else else
ssh-keygen -f $output -N '' -t $i ssh-keygen -f $output -N '' -t $i
rancherctl config set -- ssh.keys.${i} "$(<${output})" ros config set -- ssh.keys.${i} "$(<${output})"
rancherctl config set -- ssh.keys.${i}-pub "$(<${output}.pub)" ros config set -- ssh.keys.${i}-pub "$(<${output}.pub)"
fi fi
fi fi
done done
@@ -61,7 +61,7 @@ fi
setup_ssh setup_ssh
VERSION="$(rancherctl -v | awk '{print $NF}')" VERSION="$(ros -v | awk '{print $NF}')"
cat > /etc/lsb-release << EOF cat > /etc/lsb-release << EOF
DISTRIB_ID=RancherOS DISTRIB_ID=RancherOS
DISTRIB_RELEASE=${VERSION} DISTRIB_RELEASE=${VERSION}

View File

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

View File

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