[PC-BSD Commits] r16132 - in pcbsd/current/src-qt4/warden: scripts/backend src

svn at pcbsd.org svn at pcbsd.org
Mon Apr 2 09:12:00 PDT 2012


Author: kris
Date: 2012-04-02 16:12:00 +0000 (Mon, 02 Apr 2012)
New Revision: 16132

Modified:
   pcbsd/current/src-qt4/warden/scripts/backend/createjail.sh
   pcbsd/current/src-qt4/warden/src/dialogwarden.cpp
Log:

Redirect a backend error, and fix gui to diable details pane when deleting
the last jail



Modified: pcbsd/current/src-qt4/warden/scripts/backend/createjail.sh
===================================================================
--- pcbsd/current/src-qt4/warden/scripts/backend/createjail.sh	2012-04-02 16:11:11 UTC (rev 16131)
+++ pcbsd/current/src-qt4/warden/scripts/backend/createjail.sh	2012-04-02 16:12:00 UTC (rev 16132)
@@ -32,7 +32,7 @@
 fi
 
 # Make sure we don't have a host already with this name
-for i in `ls -d ${JDIR}/*`
+for i in `ls -d ${JDIR}/* 2>/dev/null`
 do
   if [ ! -e "${i}/etc/warden/host" ] ; then continue ; fi
   if [ "`cat ${i}/etc/warden/host`" = "$HOST" ] ; then

Modified: pcbsd/current/src-qt4/warden/src/dialogwarden.cpp
===================================================================
--- pcbsd/current/src-qt4/warden/src/dialogwarden.cpp	2012-04-02 16:11:11 UTC (rev 16131)
+++ pcbsd/current/src-qt4/warden/src/dialogwarden.cpp	2012-04-02 16:12:00 UTC (rev 16132)
@@ -633,6 +633,7 @@
 {
         // Finished whatever we were working on, hide the dialog now. 
         workingDialog->hide();
+	slotCurrentJailChanged();
 }
 
 
@@ -981,8 +982,16 @@
 
 void dialogWarden::slotCurrentJailChanged()
 {
-   if ( ! listJails->currentItem() )
+   if ( ! listJails->currentItem() ) {
+     groupJailTab->setEnabled(false);
+     groupJailTab->setTitle(tr("No jail selected!"));
+     labelSize->setText("");
+     labelPorts->setText("");
+     labelConnections->setText("");
+     labelType->setText("");
+     labelIPs->setText("");
      return;
+   }
 
    groupJailTab->setTitle(tr("Working on jail:") + " " + listJails->currentItem()->text(0));
    groupJailTab->setEnabled(true);



More information about the Commits mailing list