Permalink
Browse files

Move all command bind mounts to symlinks

  • Loading branch information...
1 parent a425c4c commit 6bd52cea7f99567a2496be12568df5a79305a842 @joshwget joshwget committed Dec 4, 2016
Showing with 9 additions and 10 deletions.
  1. +9 −2 cmd/control/entrypoint.go
  2. +0 −8 os-config.tpl.yml
@@ -45,7 +45,7 @@ func entrypointAction(c *cli.Context) error {
writeFiles(cfg)
}
- setupPowerOperations()
+ setupCommandSymlinks()
if len(os.Args) < 3 {
return nil
@@ -77,7 +77,7 @@ func writeFiles(cfg *config.CloudConfig) error {
return nil
}
-func setupPowerOperations() {
+func setupCommandSymlinks() {
for _, powerOperation := range []string{
"/sbin/poweroff",
"/sbin/shutdown",
@@ -92,6 +92,13 @@ func setupPowerOperations() {
}
for _, link := range []symlink{
+ {config.RosBin, "/usr/bin/cloud-init-execute"},
+ {config.RosBin, "/usr/bin/cloud-init-save"},
+ {config.RosBin, "/usr/bin/dockerlaunch"},
+ {config.RosBin, "/usr/bin/respawn"},
+ {config.RosBin, "/usr/bin/system-docker"},
+ {config.RosBin, "/usr/sbin/netconf"},
+ {config.RosBin, "/usr/sbin/wait-for-docker"},
{config.RosBin, "/sbin/poweroff"},
{config.RosBin, "/sbin/reboot"},
{config.RosBin, "/sbin/halt"},
View
@@ -117,7 +117,6 @@ rancher:
- system-volumes
volumes:
- /usr/bin/ros:/usr/bin/ros
- - /usr/bin/ros:/usr/bin/cloud-init-execute
command-volumes:
image: {{.OS_REPO}}/os-base:{{.VERSION}}{{.SUFFIX}}
command: echo
@@ -129,14 +128,7 @@ rancher:
privileged: true
read_only: true
volumes:
- - /usr/bin/ros:/usr/bin/dockerlaunch:ro
- - /usr/bin/ros:/usr/bin/system-docker:ro
- - /usr/bin/ros:/usr/bin/respawn:ro
- /usr/bin/ros:/usr/bin/ros:ro
- - /usr/bin/ros:/usr/bin/cloud-init-execute:ro
- - /usr/bin/ros:/usr/bin/cloud-init-save:ro
- - /usr/bin/ros:/usr/sbin/netconf:ro
- - /usr/bin/ros:/usr/sbin/wait-for-docker:ro
- /usr/share/rancher:/usr/share/rancher:ro
console:
image: {{.OS_REPO}}/os-console:{{.VERSION}}{{.SUFFIX}}

0 comments on commit 6bd52ce

Please sign in to comment.