fix agent update for Debian
cr
@@ -106,9 +106,12 @@ const (
// PlatformSuse represents SLES(SUSe)
PlatformSuseOS = "sles"
- // PlatformSuse represents Raspbian
+ // PlatformRaspbian represents Raspbian
PlatformRaspbian = "raspbian"
+ // PlatformDebian represents Debian
+ PlatformDebian = "debian"
+
// PlatformWindows represents windows
PlatformWindows = "windows"
@@ -302,6 +305,11 @@ func (util *Utility) CreateInstanceContext(log log.T) (context *InstanceContext,
installerName = PlatformUbuntu
Installer = InstallScript
UnInstaller = UninstallScript
+ } else if strings.Contains(platformName, PlatformDebian) {
+ platformName = PlatformDebian
+ installerName = PlatformUbuntu
+ Installer = InstallScript
+ UnInstaller = UninstallScript
} else if isNano, _ := platform.IsPlatformNanoServer(log); isNano {
//TODO move this logic to instance context
platformName = PlatformWindowsNano
@@ -607,6 +615,7 @@ func getMinimumVersionForSystemD() (systemDMap *map[string]string) {
isUsingSystemD[PlatformOracleLinux] = "7"
isUsingSystemD[PlatformUbuntu] = "15"
isUsingSystemD[PlatformSuseOS] = "12"
+ isUsingSystemD[PlatformDebian] = "8"
})
return &isUsingSystemD
}
