1
0
mirror of https://github.com/rancher/os.git synced 2025-09-25 04:37:02 +00:00

Mount the boot partition when booting

Also update StateDir and OemDir for better clarity
This commit is contained in:
niusmallnan
2018-09-30 14:30:25 +08:00
committed by niusmallnan
parent 0b5002fa47
commit eeebf0ae0f
12 changed files with 244 additions and 226 deletions

View File

@@ -11,8 +11,6 @@ import (
"github.com/rancher/os/pkg/util"
)
const BootDir = "boot/"
type MenuEntry struct {
Name, BootDir, Version, KernelArgs, Append string
}
@@ -53,7 +51,7 @@ func MountDevice(baseName, device, partition string, raw bool) (string, string,
}
if d != "" {
partition = d
baseName = filepath.Join(baseName, BootDir)
baseName = filepath.Join(baseName, config.BootDir)
} else {
if dev := util.ResolveDevice(cfg.Rancher.State.Dev); dev != "" {
// try the rancher.state.dev setting