diff options
Diffstat (limited to 'libLumina')
-rw-r--r-- | libLumina/LuminaOS-FreeBSD.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libLumina/LuminaOS-FreeBSD.cpp b/libLumina/LuminaOS-FreeBSD.cpp index 8b395026..c58d2397 100644 --- a/libLumina/LuminaOS-FreeBSD.cpp +++ b/libLumina/LuminaOS-FreeBSD.cpp @@ -142,7 +142,12 @@ void LOS::startMixerUtility(){ bool LOS::userHasShutdownAccess(){ //User needs to be a part of the operator group to be able to run the shutdown command QStringList groups = LUtils::getCmdOutput("id -Gn").join(" ").split(" "); - return groups.contains("operator"); //not implemented yet + bool ok = groups.contains("operator"); //not implemented yet + if(ok){ + //If a PC-BSD system, also disable the shutdown/restart options if the system is in the middle of upgrading + ok = (QProcess::execute("pgrep -F /tmp/.updateInProgress")!=0); //this is 0 if updating right now + } + return ok; } //System Shutdown |