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

svn at pcbsd.org svn at pcbsd.org
Wed Mar 21 06:11:23 PDT 2012


Author: kris
Date: 2012-03-21 13:11:23 +0000 (Wed, 21 Mar 2012)
New Revision: 15874

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

Start making warden use metaWidget, which allows us to test its functionality



Modified: pcbsd/current/src-qt4/warden/scripts/backend/setupusers.sh
===================================================================
--- pcbsd/current/src-qt4/warden/scripts/backend/setupusers.sh	2012-03-21 13:09:56 UTC (rev 15873)
+++ pcbsd/current/src-qt4/warden/scripts/backend/setupusers.sh	2012-03-21 13:11:23 UTC (rev 15874)
@@ -1,9 +1,7 @@
 #!/bin/sh
-# Script to setup the initial usernames / passwords on a jail
+# Script to setup the initial rootpw on a jail
 # Args $1 = IP
 # Args $2 = rootPW
-# Args $3 = userName
-# Args $4 = userPW
 ######################################################################
 
 # Source our functions
@@ -14,10 +12,8 @@
 
 IP="$1"
 ROOTPW="${2}"
-USERNAME="${3}"
-USERPW="${4}"
 
-export USERNAME USERPW ROOTPW
+export ROOTPW
 
 
 if [ -z "$IP" ]
@@ -38,9 +34,9 @@
   exit 5
 fi
 
-if [ -z "${ROOTPW}" -o -z "${USER}" -o -z "${USERPW}" ]
+if [ -z "${ROOTPW}" ]
 then
-  echo "ERROR: Missing root / user settings!"
+  echo "ERROR: Missing root pw!"
   exit 5
 fi
 
@@ -50,12 +46,10 @@
 #####################################################################
 
 echo "Changing root password on: ${IP}"
-echo "Adding user ${USERNAME} on: ${IP}"
 
 echo '#!/bin/sh
 
 echo "${ROOTPW}" | pw usermod root -h 0
-echo "${USERPW}" | pw useradd -n "${USERNAME}" -G wheel,operator -h 0 -s /bin/csh -d "/home/${USERNAME}" -m -c "${USERNAME}"
 
 ' > "${JDIR}/${IP}/.chpass.sh"
 chmod 755 "${JDIR}/${IP}/.chpass.sh"
@@ -64,5 +58,3 @@
 
 
 unset ROOTPW
-unset USERPW
-unset USERNAME

Modified: pcbsd/current/src-qt4/warden/src/dialogwarden.cpp
===================================================================
--- pcbsd/current/src-qt4/warden/src/dialogwarden.cpp	2012-03-21 13:09:56 UTC (rev 15873)
+++ pcbsd/current/src-qt4/warden/src/dialogwarden.cpp	2012-03-21 13:11:23 UTC (rev 15874)
@@ -773,4 +773,10 @@
    groupJailTab->setTitle(tr("Working on jail:") + " " + listJails->currentItem()->text(0));
    groupJailTab->setEnabled(true);
 
+   pkgWidget = new metaWidget();
+   pkgWidget->init(QString("/usr/jails/" + listJails->currentItem()->text(0)));
+   QVBoxLayout *mWLayout = new QVBoxLayout();
+   mWLayout->addWidget(pkgWidget);
+   widgetPackages->setLayout(mWLayout);
+
 }

Modified: pcbsd/current/src-qt4/warden/src/dialogwarden.h
===================================================================
--- pcbsd/current/src-qt4/warden/src/dialogwarden.h	2012-03-21 13:09:56 UTC (rev 15873)
+++ pcbsd/current/src-qt4/warden/src/dialogwarden.h	2012-03-21 13:11:23 UTC (rev 15874)
@@ -7,6 +7,7 @@
 #include "ui_dialogwarden.h"
 #include "dialogimport.h"
 #include "wizardNewJail.h"
+#include <pcbsd-utils.h>
 #include <QMenu>
 
 class dialogWarden : public QMainWindow, private Ui::dialogWarden
@@ -97,6 +98,7 @@
     QProcess *importJailProc;
     QProcess *loadInmateProc;
     QProcess *toggleAutoProc;
+    metaWidget *pkgWidget;
 
 signals:
 } ;

Modified: pcbsd/current/src-qt4/warden/src/dialogwarden.ui
===================================================================
--- pcbsd/current/src-qt4/warden/src/dialogwarden.ui	2012-03-21 13:09:56 UTC (rev 15873)
+++ pcbsd/current/src-qt4/warden/src/dialogwarden.ui	2012-03-21 13:11:23 UTC (rev 15874)
@@ -209,6 +209,16 @@
           <attribute name="title">
            <string>Packages</string>
           </attribute>
+          <widget class="QWidget" name="widgetPackages" native="true">
+           <property name="geometry">
+            <rect>
+             <x>10</x>
+             <y>10</y>
+             <width>491</width>
+             <height>341</height>
+            </rect>
+           </property>
+          </widget>
          </widget>
         </widget>
        </item>



More information about the Commits mailing list