mirror of
https://github.com/rancher/os.git
synced 2025-09-03 07:44:21 +00:00
Make /run/lock dir in console
This commit is contained in:
@@ -29,6 +29,7 @@ const (
|
|||||||
gettyCmd = "/sbin/agetty"
|
gettyCmd = "/sbin/agetty"
|
||||||
rancherHome = "/home/rancher"
|
rancherHome = "/home/rancher"
|
||||||
startScript = "/opt/rancher/bin/start.sh"
|
startScript = "/opt/rancher/bin/start.sh"
|
||||||
|
runLockDir = "/run/lock"
|
||||||
)
|
)
|
||||||
|
|
||||||
type symlink struct {
|
type symlink struct {
|
||||||
@@ -68,6 +69,13 @@ func consoleInitFunc() error {
|
|||||||
createHomeDir(rancherHome, 1100, 1100)
|
createHomeDir(rancherHome, 1100, 1100)
|
||||||
createHomeDir(dockerHome, 1101, 1101)
|
createHomeDir(dockerHome, 1101, 1101)
|
||||||
|
|
||||||
|
// some software need this dir, like open-iscsi
|
||||||
|
if _, err := os.Stat(runLockDir); os.IsNotExist(err) {
|
||||||
|
if err = os.Mkdir(runLockDir, 0755); err != nil {
|
||||||
|
log.Error(err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ignorePassword := false
|
ignorePassword := false
|
||||||
for _, d := range cfg.Rancher.Disable {
|
for _, d := range cfg.Rancher.Disable {
|
||||||
if d == "password" {
|
if d == "password" {
|
||||||
|
Reference in New Issue
Block a user