mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-08-16 05:39:34 +00:00
rootless: write the custom config file before reload
so that when we do a rootlessReload we inherit the correct settings from the command line. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
parent
8aed32acea
commit
7efefde3bc
1 changed files with 3 additions and 4 deletions
|
|
@ -505,10 +505,6 @@ func newRuntimeFromConfig(userConfigPath string, options ...RuntimeOption) (runt
|
|||
return nil, errors.Wrapf(err, "error configuring runtime")
|
||||
}
|
||||
}
|
||||
if err := makeRuntime(runtime); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if !foundConfig && rootlessConfigPath != "" {
|
||||
os.MkdirAll(filepath.Dir(rootlessConfigPath), 0755)
|
||||
file, err := os.OpenFile(rootlessConfigPath, os.O_RDWR|os.O_CREATE|os.O_EXCL, 0666)
|
||||
|
|
@ -523,6 +519,9 @@ func newRuntimeFromConfig(userConfigPath string, options ...RuntimeOption) (runt
|
|||
}
|
||||
}
|
||||
}
|
||||
if err := makeRuntime(runtime); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return runtime, nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue