From 0fdcdb2c9ba1e64c7104863dee13fdab37995f94 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Sat, 1 Sep 2018 06:31:49 -0400 Subject: [PATCH] Update WebBackend.cpp Fix the sysadm/pkg API class detection method to account for the new location of the "pkg" binary on TrueOS 18.06 Also fix the sysadm/update API class to look for the "trueos-update" utility. --- src/server/WebBackend.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server/WebBackend.cpp b/src/server/WebBackend.cpp index fed348d..711074b 100644 --- a/src/server/WebBackend.cpp +++ b/src/server/WebBackend.cpp @@ -77,7 +77,7 @@ RestOutputStruct::ExitCode WebSocket::AvailableSubsystems(bool allaccess, QJsonO } // - pkg - if(QFile::exists("/usr/local/sbin/pkg")){ + if(QFile::exists("/usr/local/sbin/pkg") || QFile::exists("/usr/sbin/pkg")){ out->insert("sysadm/pkg", "read/write"); } @@ -85,7 +85,7 @@ RestOutputStruct::ExitCode WebSocket::AvailableSubsystems(bool allaccess, QJsonO out->insert("sysadm/systemmanager","read/write"); // - PC-BSD/TrueOS Updater - if(QFile::exists("/usr/local/bin/pc-updatemanager")){ + if(QFile::exists("/usr/local/bin/pc-updatemanager") || QFile::exists("/usr/sbin/trueos-update")){ out->insert("sysadm/update", "read/write"); }