NRI: instantiate and start/stop NRI adaptation

Signed-off-by: Rob Murray <rob.murray@docker.com>
This commit is contained in:
Rob Murray
2025-12-02 17:26:12 +00:00
parent 4941b36883
commit 282868dabf
4 changed files with 151 additions and 1 deletions

View File

@@ -103,3 +103,13 @@ func GetLibHome() (string, error) {
}
return filepath.Join(home, ".local/lib"), nil
}
// GetLibexecHome returns $HOME/.local/libexec
// If HOME is not set, getpwent(3) is consulted to determine the users home directory.
func GetLibexecHome() (string, error) {
home := Get()
if home == "" {
return "", errors.New("could not get HOME")
}
return filepath.Join(home, ".local/libexec"), nil
}

View File

@@ -30,3 +30,8 @@ func GetConfigHome() (string, error) {
func GetLibHome() (string, error) {
return "", errors.New("homedir.GetLibHome() is not supported on this system")
}
// GetLibexecHome is unsupported on non-linux system.
func GetLibexecHome() (string, error) {
return "", errors.New("homedir.GetLibexecHome() is not supported on this system")
}