[PC-BSD Commits] r21658 - pcbsd-projects/PCDM

svn at pcbsd.org svn at pcbsd.org
Tue Feb 26 15:37:55 PST 2013


Author: kenmoore
Date: 2013-02-26 23:37:54 +0000 (Tue, 26 Feb 2013)
New Revision: 21658

Modified:
   pcbsd-projects/PCDM/PCDMd
   pcbsd-projects/PCDM/pcdm-gui.cpp
Log:
Now clean up the shutdown/restart stuff from the PCDM daemon



Modified: pcbsd-projects/PCDM/PCDMd
===================================================================
--- pcbsd-projects/PCDM/PCDMd	2013-02-26 23:30:52 UTC (rev 21657)
+++ pcbsd-projects/PCDM/PCDMd	2013-02-26 23:37:54 UTC (rev 21658)
@@ -15,21 +15,12 @@
   # No XDMCP support
 
   # Allow Auto-Login the first time PCDM starts
-  pcdm_ret = xinit /usr/local/bin/PCDM-session -AutoLogin -- :0
   xinit /usr/local/bin/PCDM-session -AutoLogin -- :0
-  while [ pcdm_ret -eq 0 ]; do
+  while [ 1 ]; do
     # Always return to PCDM after a logout (prevent root shell opening)
+    wait(10)   # wait 10 ms before opening up another one
     pcdm_ret = xinit /usr/local/bin/PCDM-session -- :0
   done
-
-  if [ pcdm_ret -eq 1 ]; then
-    #Restart the computer
-    shutdown -r now
-  elif [ pcdm_ret -eq 2 ]; then
-    #Shutdown the computer
-    shutdown -p now
-  fi
   
-  
 fi
 	

Modified: pcbsd-projects/PCDM/pcdm-gui.cpp
===================================================================
--- pcbsd-projects/PCDM/pcdm-gui.cpp	2013-02-26 23:30:52 UTC (rev 21657)
+++ pcbsd-projects/PCDM/pcdm-gui.cpp	2013-02-26 23:37:54 UTC (rev 21658)
@@ -262,8 +262,8 @@
   if(ret == QMessageBox::Yes){
     Backend::log("PCDM: Shutting down computer");
     system("shutdown -p now");
-    QCoreApplication::exit(2);
-    close();
+    //QCoreApplication::exit(2);
+    //close();
   }
 }
 
@@ -279,8 +279,8 @@
   if(ret == QMessageBox::Yes){
     Backend::log("PCDM: Restarting computer");
     system("shutdown -r now");
-    QCoreApplication::exit(1);
-    close();
+    //QCoreApplication::exit(1);
+    //close();
   }
 }
 



More information about the Commits mailing list