From 64d080336c8199fda48d8050bb0f64860e4059bf Mon Sep 17 00:00:00 2001 From: Mbucari Date: Fri, 19 May 2023 11:30:09 -0600 Subject: [PATCH] Use correct package manager --- Source/LoadByOS/LinuxConfigApp/LinuxInterop.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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)