BUGFIX: gocage update was not installing

This commit is contained in:
yo 2023-08-06 13:47:15 +02:00
parent 684d97cc21
commit 346fd52a8e

View File

@ -21,7 +21,7 @@ func updateJail(jail *Jail) error {
defer cfgFile.Close()
defer os.Remove(cfgFile.Name())
// Folder containing update/uipgrade temporary files. Common so we save bandwith when upgrading multiple jails
// Folder containing update/upgrade temporary files. Common so we save bandwith when upgrading multiple jails
// TODO: Variabilize /iocage/freebsd-update
_, err = os.Stat("/iocage/freebsd-update")
if os.IsNotExist(err) {
@ -30,11 +30,15 @@ func updateJail(jail *Jail) error {
}
}
cmd := fmt.Sprintf("/usr/sbin/freebsd-update --not-running-from-cron -f %s -b %s --currently-running %s fetch install",
cmd := fmt.Sprintf("/usr/sbin/freebsd-update --not-running-from-cron -f %s -b %s --currently-running %s fetch",
cfgFile.Name(), jail.RootPath, jail.Config.Release)
err = executeCommandWithOutputToStdout(cmd)
if err != nil {
return err
}
//fmt.Printf("DEBUG: Prepare to execute \"%s\"\n", cmd)
cmd = fmt.Sprintf("/usr/sbin/freebsd-update --not-running-from-cron -f %s -b %s --currently-running %s install",
cfgFile.Name(), jail.RootPath, jail.Config.Release)
err = executeCommandWithOutputToStdout(cmd)
if err != nil {
return err