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

My first pass at fixing the b2d autoformat

Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
This commit is contained in:
Sven Dowideit
2017-01-20 17:02:48 +10:00
parent 1c5d41a56e
commit a4e77692c4
6 changed files with 33 additions and 5 deletions

View File

@@ -4,6 +4,7 @@ import (
"io/ioutil"
"os"
"path"
"path/filepath"
"sort"
"strings"
@@ -171,7 +172,7 @@ func readCmdline() map[interface{}]interface{} {
return nil
}
log.Debugf("Config cmdline %s", cmdLine)
//log.Debugf("Config cmdline %s", cmdLine)
cmdLineObj := parseCmdline(strings.TrimSpace(util.UnescapeKernelParams(string(cmdLine))))
@@ -219,6 +220,10 @@ func WriteToFile(data interface{}, filename string) error {
return err
}
if err := os.MkdirAll(filepath.Dir(filename), os.ModeDir|0755); err != nil {
return err
}
return util.WriteFileAtomic(filename, content, 400)
}