diff options
author | Ken Moore <ken@pcbsd.org> | 2015-03-02 08:30:52 -0500 |
---|---|---|
committer | Ken Moore <ken@pcbsd.org> | 2015-03-02 08:30:52 -0500 |
commit | d84018532345fd43164016867e919f003fcacc04 (patch) | |
tree | 5025359698d02caf7d10c9ab46e82bbd2e2d5925 /libLumina/LuminaOS-FreeBSD.cpp | |
parent | Update how lumina-open detects applications which are registered on the syste... (diff) | |
download | lumina-d84018532345fd43164016867e919f003fcacc04.tar.gz lumina-d84018532345fd43164016867e919f003fcacc04.tar.bz2 lumina-d84018532345fd43164016867e919f003fcacc04.zip |
Disable the shutdown/restart buttons on PC-BSD systems if the system is in the middle of performing updates.
Diffstat (limited to 'libLumina/LuminaOS-FreeBSD.cpp')
-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 |