mirror of
https://github.com/rancher/os.git
synced 2025-09-10 03:01:02 +00:00
Move all command bind mounts to symlinks
This commit is contained in:
@@ -45,7 +45,7 @@ func entrypointAction(c *cli.Context) error {
|
|||||||
writeFiles(cfg)
|
writeFiles(cfg)
|
||||||
}
|
}
|
||||||
|
|
||||||
setupPowerOperations()
|
setupCommandSymlinks()
|
||||||
|
|
||||||
if len(os.Args) < 3 {
|
if len(os.Args) < 3 {
|
||||||
return nil
|
return nil
|
||||||
@@ -77,7 +77,7 @@ func writeFiles(cfg *config.CloudConfig) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func setupPowerOperations() {
|
func setupCommandSymlinks() {
|
||||||
for _, powerOperation := range []string{
|
for _, powerOperation := range []string{
|
||||||
"/sbin/poweroff",
|
"/sbin/poweroff",
|
||||||
"/sbin/shutdown",
|
"/sbin/shutdown",
|
||||||
@@ -92,6 +92,13 @@ func setupPowerOperations() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for _, link := range []symlink{
|
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/poweroff"},
|
||||||
{config.RosBin, "/sbin/reboot"},
|
{config.RosBin, "/sbin/reboot"},
|
||||||
{config.RosBin, "/sbin/halt"},
|
{config.RosBin, "/sbin/halt"},
|
||||||
|
@@ -117,7 +117,6 @@ rancher:
|
|||||||
- system-volumes
|
- system-volumes
|
||||||
volumes:
|
volumes:
|
||||||
- /usr/bin/ros:/usr/bin/ros
|
- /usr/bin/ros:/usr/bin/ros
|
||||||
- /usr/bin/ros:/usr/bin/cloud-init-execute
|
|
||||||
command-volumes:
|
command-volumes:
|
||||||
image: {{.OS_REPO}}/os-base:{{.VERSION}}{{.SUFFIX}}
|
image: {{.OS_REPO}}/os-base:{{.VERSION}}{{.SUFFIX}}
|
||||||
command: echo
|
command: echo
|
||||||
@@ -129,14 +128,7 @@ rancher:
|
|||||||
privileged: true
|
privileged: true
|
||||||
read_only: true
|
read_only: true
|
||||||
volumes:
|
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/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
|
- /usr/share/rancher:/usr/share/rancher:ro
|
||||||
console:
|
console:
|
||||||
image: {{.OS_REPO}}/os-console:{{.VERSION}}{{.SUFFIX}}
|
image: {{.OS_REPO}}/os-console:{{.VERSION}}{{.SUFFIX}}
|
||||||
|
Reference in New Issue
Block a user