diff --git a/Source/LoadByOS/LinuxConfigApp/LinuxInterop.cs b/Source/LoadByOS/LinuxConfigApp/LinuxInterop.cs index 988a3309..d1c987d0 100644 --- a/Source/LoadByOS/LinuxConfigApp/LinuxInterop.cs +++ b/Source/LoadByOS/LinuxConfigApp/LinuxInterop.cs @@ -28,11 +28,14 @@ namespace LinuxConfigApp public string ReleaseIdentifier => LibationScaffolding.ReleaseIdentifier.ToString() + (File.Exists("/bin/yum") ? "_RPM" : ""); //only run the auto upgrader if the current app was installed from the - //.deb package. Try to detect this by checking if the symlink exists. + //.deb or .rpm package. Try to detect this by checking if the symlink exists. public bool CanUpgrade => Directory.Exists("/usr/lib/libation"); public void InstallUpgrade(string upgradeBundle) { - RunAsRoot("apt", $"install '{upgradeBundle}'"); + if (File.Exists("/bin/yum")) + RunAsRoot("yum", $"install '{upgradeBundle}'"); + else + RunAsRoot("apt", $"install '{upgradeBundle}'"); } public Process RunAsRoot(string exe, string args)