pkg/podman: Wrap 'podman system migrate'
https://github.com/containers/toolbox/pull/318
This commit is contained in:
parent
46c21a5c14
commit
d1a9fe20aa
|
|
@ -74,3 +74,17 @@ func GetVersion() (string, error) {
|
|||
func SetLogLevel(logLevel logrus.Level) {
|
||||
LogLevel = logLevel
|
||||
}
|
||||
|
||||
func SystemMigrate(ociRuntimeRequired string) error {
|
||||
logLevelString := LogLevel.String()
|
||||
args := []string{"--log-level", logLevelString, "system", "migrate"}
|
||||
if ociRuntimeRequired != "" {
|
||||
args = append(args, []string{"--new-runtime", ociRuntimeRequired}...)
|
||||
}
|
||||
|
||||
if err := shell.Run("podman", nil, nil, nil, args...); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue