mirror of
https://github.com/lingble/talos.git
synced 2025-12-02 13:53:40 +00:00
refactor: improve installation reliability
This change aims to make installations more unified and reliable. It introduces the concept of a mountpoint manager that is capable of mounting, unmounting, and moving a set of mountpoints in the correct order. Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
This commit is contained in:
@@ -6,26 +6,12 @@ package proc
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"path"
|
||||
"strings"
|
||||
|
||||
"code.cloudfoundry.org/bytefmt"
|
||||
"github.com/prometheus/procfs"
|
||||
)
|
||||
|
||||
// SystemProperty represents a kernel system property.
|
||||
type SystemProperty struct {
|
||||
Key string
|
||||
Value string
|
||||
}
|
||||
|
||||
// WriteSystemProperty writes a value to a key under /proc/sys.
|
||||
func WriteSystemProperty(prop *SystemProperty) error {
|
||||
keyPath := path.Join("/proc/sys", strings.Replace(prop.Key, ".", "/", -1))
|
||||
return ioutil.WriteFile(keyPath, []byte(prop.Value), 0644)
|
||||
}
|
||||
|
||||
// ProcessList contains all of the process stats we want
|
||||
// to display via top
|
||||
type ProcessList struct {
|
||||
|
||||
Reference in New Issue
Block a user