From 8d18bfe55dbddf0be2fca8eb907e4f115c89eb2e Mon Sep 17 00:00:00 2001 From: yo Date: Sat, 2 Apr 2022 15:38:24 +0200 Subject: [PATCH] Bugfix --- cmd/start.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/start.go b/cmd/start.go index be92b87..acd44ae 100644 --- a/cmd/start.go +++ b/cmd/start.go @@ -78,7 +78,7 @@ func setJailConfigUpdated(jail *Jail) error { } func mountProcFs(jail *Jail) error { - cmd = fmt.Sprintf("mount -t procfs proc %s/proc", jail.RootPath) + cmd := fmt.Sprintf("mount -t procfs proc %s/proc", jail.RootPath) _, err := executeCommand(cmd) if err != nil { return errors.New(fmt.Sprintf("Error mounting procfs on %s/proc: %s", jail.RootPath, err.Error())) @@ -96,7 +96,7 @@ func mountLinProcFs(jail *Jail) error { return errors.New(fmt.Sprintf("Error creating directory %s: %s", ldir, errDir.Error())) } } - cmd = fmt.Sprintf("mount -t linprocfs linproc %s", ldir) + cmd := fmt.Sprintf("mount -t linprocfs linproc %s", ldir) _, err = executeCommand(cmd) if err != nil { return errors.New(fmt.Sprintf("Error mounting linprocfs on %s: %s", ldir, err.Error())) @@ -106,7 +106,7 @@ func mountLinProcFs(jail *Jail) error { } func mountDevFs(jail *Jail) error { - cmd = fmt.Sprintf("mount -t devfs dev %s/dev", jail.RootPath) + cmd := fmt.Sprintf("mount -t devfs dev %s/dev", jail.RootPath) _, err := executeCommand(cmd) if err != nil { return errors.New(fmt.Sprintf("Error mounting devfs on %s/dev: %s", jail.RootPath, err.Error())) @@ -127,7 +127,7 @@ func mountFdescFs(jail *Jail) error { return nil } - cmd = fmt.Sprintf("mount -t fdescfs descfs %s/dev/fd", jail.RootPath) + cmd := fmt.Sprintf("mount -t fdescfs descfs %s/dev/fd", jail.RootPath) _, err := executeCommand(cmd) if err != nil { return errors.New(fmt.Sprintf("Error mounting fdescfs on %s/dev/fd: %s", jail.RootPath, err.Error()))