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:
@@ -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
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user