This commit is contained in:
yo 2022-04-02 15:38:24 +02:00
parent eacc165481
commit 8d18bfe55d

View File

@ -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()))