cmd/ctrld: ensure ctrld start after NetworkManager

This commit is contained in:
Cuong Manh Le
2023-02-01 22:50:14 +07:00
committed by Cuong Manh Le
parent 8c47ffb5ec
commit 1c2cd555bd

View File

@@ -186,6 +186,11 @@ func initCLI() {
if os.Args[1] == "service" {
osArgs = os.Args[3:]
}
if runtime.GOOS == "linux" {
sc.Dependencies = []string{
"After=NetworkManager-wait-online.service",
}
}
sc.Arguments = append([]string{"run"}, osArgs...)
if dir, err := os.UserHomeDir(); err == nil {
// WorkingDirectory is not supported on Windows.