1
0
mirror of https://github.com/rancher/os.git synced 2025-09-04 16:21:07 +00:00

Additional mounts can be set in cloud config

This commit is contained in:
Josh Curl
2016-05-25 14:27:07 -07:00
parent a002939a3f
commit f24facc06c
4 changed files with 38 additions and 2 deletions

View File

@@ -26,6 +26,7 @@ import (
"time"
yaml "github.com/cloudfoundry-incubator/candiedyaml"
"github.com/docker/docker/pkg/mount"
log "github.com/Sirupsen/logrus"
"github.com/coreos/coreos-cloudinit/config"
@@ -216,6 +217,15 @@ func executeCloudConfig() error {
}
}
for _, configMount := range cc.Mounts {
if len(configMount) != 4 {
log.Errorf("Unable to mount %s: must specify exactly four arguments", configMount[1])
}
if err := mount.Mount(configMount[0], configMount[1], configMount[2], configMount[3]); err != nil {
log.Errorf("Unable to mount %s: %s", configMount[1], err)
}
}
return nil
}