1
0
mirror of https://github.com/rancher/os.git synced 2025-09-01 06:40:31 +00:00

add power functions - down, restart, halt

This commit is contained in:
sidharthamani
2015-02-12 15:22:48 -08:00
parent 70b376ce6a
commit 56a4f96b24
4 changed files with 167 additions and 7 deletions

View File

@@ -55,6 +55,9 @@ var (
"/sbin/modprobe": "/busybox",
"/var/run": "/run",
DOCKER: "/docker",
"/sbin/poweroff": "/init",
"/sbin/halt": "/init",
"/sbin/reboot": "/init",
}
)
@@ -215,10 +218,10 @@ func mountState(cfg *config.Config) error {
var err error
dev := util.ResolveDevice(cfg.StateDev)
log.Debugf("Mounting state device %s", dev)
log.Debugf("Mounting state device %s", dev)
fsType := cfg.StateDevFSType
log.Debugf("FsType has been set to %s", fsType)
log.Debugf("FsType has been set to %s", fsType)
if fsType == "auto" {
actualFsType, fsErr := util.GetFsType(dev)
if fsErr != nil {