Changeset d22fc5d


Ignore:
Timestamp:
02/03/14 11:10:01 (8 months ago)
Author:
Ken Moore <ken@…>
Branches:
master, releng/10.0.1, releng/10.0.2, releng/10.0.3
Children:
4f9718b, 11d9290
Parents:
abf6336 (diff), 405f33b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of github.com:pcbsd/pcbsd

Location:
src-qt4
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • src-qt4/pc-pkgmanager/mainWin.cpp

    r77024b5 r405f33b  
    986986    // Now spin up the install process 
    987987    if ( wDir.isEmpty() ) 
    988       pCmds << "pc-pkg" << "install" << "-y" << pkgAddList.join(" "); 
     988      pCmds << "pkg" << "install" << "-y" << pkgAddList.join(" "); 
    989989    else 
    990       pCmds << "chroot" << wDir << "pc-pkg" << "install" << "-y" << pkgAddList.join(" "); 
     990      pCmds << "chroot" << wDir << "pkg" << "install" << "-y" << pkgAddList.join(" "); 
    991991 
    992992    pkgCmdList << pCmds; 
  • src-qt4/PCDM/src/main.cpp

    raf50abb r5e38281  
    3939  //clock.start(); 
    4040  Backend::checkLocalDirs();  // Create and fill "/usr/local/share/PCDM" if needed 
    41   Backend::openLogFile("/var/log/PCDM.log");   
     41  Backend::openLogFile("/var/log/PCDM.log");  
     42  qDebug() << "PCDM Log File: /var/log/PCDM.log"; 
    4243  //qDebug() << "Backend Checks Finished:" << QString::number(clock.elapsed())+" ms"; 
    4344  //Setup the initial system environment (locale, keyboard) 
  • src-qt4/PCDM/src/pcdm-backend.cpp

    r733b811 r5e38281  
    224224 
    225225void Backend::openLogFile(QString logFilePath){ 
    226   //If a log file exists, remove it 
    227   if(QFile::exists(logFilePath)){ QFile::remove(logFilePath); } 
     226  //If a log file exists, move it to *.old 
     227  if(QFile::exists(logFilePath)){  
     228    if(QFile::exists(logFilePath+".old")){ QFile::remove(logFilePath+".old"); } 
     229    QFile::rename(logFilePath, logFilePath+".old");  
     230  } 
    228231  //save the path to the logfile 
    229232  logFile = logFilePath; 
  • src-qt4/PCDM/src/pcdm-xprocess.cpp

    r3db4432 r5e38281  
    2929  pam_session_open = FALSE; 
    3030  //Setup the finished signal/slot 
    31   connect( this, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(slotCleanup()) ); 
     31  //connect( this, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(slotCleanup()) ); 
    3232} 
    3333 
     
    6969 
    7070bool XProcess::startXSession(){ 
    71   disconnect(SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(slotCleanup()) ); 
     71  //disconnect(SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(slotCleanup()) ); 
    7272  //Check that the necessary info to start the session is available 
    7373  if( xuser.isEmpty() || xcmd.isEmpty() || xhome.isEmpty() || xde.isEmpty() ){ 
     
    9999  // Get the environment before we drop priv 
    100100  this->setProcessEnvironment( QProcessEnvironment::systemEnvironment() ); //current environment 
     101  //Emit the last couple logs before dropping privileges 
     102  Backend::log("Starting session:"); 
     103  Backend::log(" - Session Log: ~/.pcdm-startup.log"); 
    101104  //Now allow this user access to the Xserver 
    102105  QString xhostcmd = "xhost si:localuser:"+xuser; 
     
    132135  cmd.append("dbus-launch --exit-with-session "+xcmd); 
    133136  //cmd.append(xcmd); 
    134   //cmd.append("; kill -l KILL"); //to clean up the session afterwards 
     137 
    135138  //Backend::log("Startup command: "+cmd); 
    136139  // Setup the process environment 
    137140  setupSessionEnvironment(); 
    138141  //Log the DE startup outputs as well 
     142  this->setProcessChannelMode(QProcess::MergedChannels); 
    139143  this->setStandardOutputFile(xhome+"/.pcdm-startup.log",QIODevice::Truncate); 
    140   this->setStandardErrorFile(xhome+"/.pcdm-startup.err",QIODevice::Truncate); 
     144  //this->setStandardErrorFile(xhome+"/.pcdm-startup.err",QIODevice::Truncate); 
    141145  // Startup the process(s) 
    142146   //  - Setup to run the user's <home-dir>/.xprofile startup script 
    143   Backend::log("Starting session:"); 
    144147  if(QFile::exists(xhome+"/.xprofile")){ 
    145148    //Make sure the file is executable 
     
    149152    contents << ". "+xhome+"/.xprofile"; 
    150153    contents << cmd; //end with the actual command for the DE 
     154    contents << "exit $?"; //Make sure we return the DE return value 
    151155    if( Backend::writeFile(xhome+"/.pcdmsessionstart", contents) ){ 
    152156      //script created fine, change the command to just run it 
     
    154158    }else{ 
    155159      //Could not create script file, fallback on running them seperately 
    156       Backend::log(" --Run user ~/.xprofile"); 
    157160      QString xpro = "sh "+xhome+"/.xprofile"; 
    158161      this->start(xpro); 
     
    166169 
    167170void XProcess::slotCleanup(){ 
     171  Backend::log("Session Finished\n - Return Code: "+ QString::number(this->exitCode()) ); 
    168172  pam_shutdown(); //make sure that PAM shuts down properly 
    169173  //Now remove this user's access to the Xserver 
Note: See TracChangeset for help on using the changeset viewer.