updated for unix build

This commit is contained in:
redanthrax 2022-06-22 13:53:50 -07:00
parent 66aca05028
commit e20edcc9ad
37 changed files with 1001 additions and 257 deletions

View file

@ -1,7 +1,12 @@
//go:build !windows
// +build !windows
package patching
func PatchMgmnt(enable bool) error { return nil }
func GetUpdates() {}
func GetUpdates()(PackageList, error) {
return PackageList{}, nil
}
func InstallUpdates(guids []string) {}

View file

@ -36,7 +36,7 @@ func PatchMgmnt(enable bool) error {
return nil
}
type PackageList []Package
func GetUpdates() (PackageList, error) {
wuaupdates, err := wua.WUAUpdates("IsInstalled=1 or IsInstalled=0 and Type='Software' and IsHidden=0")

View file

@ -30,3 +30,5 @@ type AgentNeedsReboot struct {
AgentID string `json:"agent_id"`
NeedsReboot bool `json:"needs_reboot"`
}
type PackageList []Package