aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/libLumina/LuminaOS-FreeBSD.cpp
diff options
context:
space:
mode:
authorKen Moore <moorekou@gmail.com>2016-08-18 15:50:49 -0400
committerKen Moore <moorekou@gmail.com>2016-08-18 15:50:49 -0400
commitbd87d69b5c64a80a209e5cd8e3f0c7fac608c87c (patch)
tree1c3717afdba77275ad9b2028ee9eefae71682442 /src-qt5/core/libLumina/LuminaOS-FreeBSD.cpp
parentOops - NOW the OS-detect.pri file is fixed for the LIBPREFIX variable (also c... (diff)
downloadlumina-bd87d69b5c64a80a209e5cd8e3f0c7fac608c87c.tar.gz
lumina-bd87d69b5c64a80a209e5cd8e3f0c7fac608c87c.tar.bz2
lumina-bd87d69b5c64a80a209e5cd8e3f0c7fac608c87c.zip
Add in pending update detection/skipping ability to the main logout window (not the start menu options yet).
Diffstat (limited to 'src-qt5/core/libLumina/LuminaOS-FreeBSD.cpp')
-rw-r--r--src-qt5/core/libLumina/LuminaOS-FreeBSD.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/src-qt5/core/libLumina/LuminaOS-FreeBSD.cpp b/src-qt5/core/libLumina/LuminaOS-FreeBSD.cpp
index e0706a98..10216f92 100644
--- a/src-qt5/core/libLumina/LuminaOS-FreeBSD.cpp
+++ b/src-qt5/core/libLumina/LuminaOS-FreeBSD.cpp
@@ -210,14 +210,22 @@ bool LOS::systemPerformingUpdates(){
return (QProcess::execute("pgrep -F /tmp/.updateInProgress")==0); //this is 0 if updating right now
}
+//Return the details of any updates which are waiting to apply on shutdown
+QString LOS::systemPendingUpdates(){
+ if(QFile::exists("/tmp/.rebootRequired")){ return LUtils::readFile("/tmp/.rebootRequired").join("\n"); }
+ else{ return ""; }
+}
+
//System Shutdown
-void LOS::systemShutdown(){ //start poweroff sequence
- QProcess::startDetached("shutdown -p now");
+void LOS::systemShutdown(bool skipupdates){ //start poweroff sequence
+ if(skipupdates){QProcess::startDetached("shutdown -po now"); }
+ else{ QProcess::startDetached("shutdown -p now"); }
}
//System Restart
-void LOS::systemRestart(){ //start reboot sequence
- QProcess::startDetached("shutdown -r now");
+void LOS::systemRestart(bool skipupdates){ //start reboot sequence
+ if(skipupdates){QProcess::startDetached("shutdown -ro now"); }
+ else{ QProcess::startDetached("shutdown -r now"); }
}
//Check for suspend support
bgstack15