use RunCmd for postup/postdown

This commit is contained in:
Matthew R. Kasun
2022-09-09 14:15:10 -04:00
parent 0ade279ca7
commit 7ec8c4be2a
6 changed files with 30 additions and 24 deletions

View File

@@ -659,8 +659,7 @@ func deleteInterface(ifacename string, postdown string) error {
}
_, err = ncutils.RunCmd(ipExec+" link del "+ifacename, false)
if postdown != "" {
runcmds := strings.Split(postdown, "; ")
err = ncutils.RunCmds(runcmds, false)
_, err = ncutils.RunCmd(postdown, false)
}
}
return err