[PC-BSD Commits] r5177 - pcbsd/trunk/SysInstaller
svn at pcbsd.org
svn at pcbsd.org
Tue Dec 1 11:27:03 PST 2009
Author: kris
Date: 2009-12-01 11:27:03 -0800 (Tue, 01 Dec 2009)
New Revision: 5177
Modified:
pcbsd/trunk/SysInstaller/sys-componentwidget.cpp
pcbsd/trunk/SysInstaller/sys-userwidget.cpp
pcbsd/trunk/SysInstaller/sysinstaller.cpp
pcbsd/trunk/SysInstaller/sysinstaller.h
pcbsd/trunk/SysInstaller/sysinstaller.ui
Log:
Added component / user information to generated cfg
Modified: pcbsd/trunk/SysInstaller/sys-componentwidget.cpp
===================================================================
--- pcbsd/trunk/SysInstaller/sys-componentwidget.cpp 2009-12-01 18:54:05 UTC (rev 5176)
+++ pcbsd/trunk/SysInstaller/sys-componentwidget.cpp 2009-12-01 19:27:03 UTC (rev 5177)
@@ -61,3 +61,24 @@
refreshComponents();
}
+
+
+// Return list of components to install
+QStringList SysInstaller::getComponentCfgSettings()
+{
+ QStringList componentList;
+ QString tmpList;
+ for ( int i=0; i<listComponents.count(); ++i) {
+ if ( listComponents.at(i).at(3) == "on" )
+ tmpList = tmpList + listComponents.at(i).at(0) + ",";
+ }
+
+ if ( tmpList.size() > 0 )
+ tmpList.truncate(tmpList.size() -1 );
+
+ componentList << "";
+ componentList << "# Optional Components";
+ componentList << "installComponents=" + tmpList;
+
+ return componentList;
+}
Modified: pcbsd/trunk/SysInstaller/sys-userwidget.cpp
===================================================================
--- pcbsd/trunk/SysInstaller/sys-userwidget.cpp 2009-12-01 18:54:05 UTC (rev 5176)
+++ pcbsd/trunk/SysInstaller/sys-userwidget.cpp 2009-12-01 19:27:03 UTC (rev 5177)
@@ -253,3 +253,31 @@
return ok;
}
+// Return list of users in cfg format
+QStringList SysInstaller::getUsersCfgSettings()
+{
+ QStringList userList;
+
+ userList << "";
+ userList << "# Root Password";
+ userList << "rootPass=" + linePassword->text();
+
+ userList << "";
+ userList << "# Users";
+
+ for ( int i = 0; i < listUsers.count(); ++i) {
+ userList << "userName=" + listUsers.at(i).at(0);
+ userList << "userComment=" + listUsers.at(i).at(1);
+ userList << "userPass=" + listUsers.at(i).at(2);
+ userList << "userShell=" + listUsers.at(i).at(3);
+ userList << "userHome=/home/" + listUsers.at(i).at(0);
+ userList << "userGroups=wheel,operator";
+ if(checkAutoLogon->isChecked() && i == 0)
+ userList << "autoLoginUser=" + listUsers.at(i).at(0);
+ userList << "commitUser";
+ userList << "";
+ }
+
+
+ return userList;
+}
Modified: pcbsd/trunk/SysInstaller/sysinstaller.cpp
===================================================================
--- pcbsd/trunk/SysInstaller/sysinstaller.cpp 2009-12-01 18:54:05 UTC (rev 5176)
+++ pcbsd/trunk/SysInstaller/sysinstaller.cpp 2009-12-01 19:27:03 UTC (rev 5177)
@@ -408,6 +408,13 @@
tmpList << "localizeLang=" + lang;
}
+ // Save the timezone
+ tmp = comboBoxTimezone->currentText();
+ tmp.truncate(tmp.indexOf(":"));
+ tmpList << "";
+ tmpList << "# Timezone";
+ tmpList << "timeZone=" + tmp ;
+
// Now figure out of we need to set custom keyboard layouts
if ( ! checkKbDefault->isChecked() )
{
@@ -445,6 +452,8 @@
cfgList+=getGlobalCfgSettings();
cfgList+=getDiskCfgSettings();
+ cfgList+=getComponentCfgSettings();
+ cfgList+=getUsersCfgSettings();
textEditSummary->clear();
Modified: pcbsd/trunk/SysInstaller/sysinstaller.h
===================================================================
--- pcbsd/trunk/SysInstaller/sysinstaller.h 2009-12-01 18:54:05 UTC (rev 5176)
+++ pcbsd/trunk/SysInstaller/sysinstaller.h 2009-12-01 19:27:03 UTC (rev 5177)
@@ -133,6 +133,8 @@
// Functions which return parts of the config file
QStringList getGlobalCfgSettings();
QStringList getDiskCfgSettings();
+ QStringList getComponentCfgSettings();
+ QStringList getUsersCfgSettings();
void startConfigGen(); // Function which takes pieces of cfg, and assembles
Modified: pcbsd/trunk/SysInstaller/sysinstaller.ui
===================================================================
--- pcbsd/trunk/SysInstaller/sysinstaller.ui 2009-12-01 18:54:05 UTC (rev 5176)
+++ pcbsd/trunk/SysInstaller/sysinstaller.ui 2009-12-01 19:27:03 UTC (rev 5177)
@@ -300,7 +300,7 @@
<item>
<widget class="QStackedWidget" name="anteInstallStack">
<property name="currentIndex">
- <number>3</number>
+ <number>2</number>
</property>
<widget class="QWidget" name="aiStep0">
<layout class="QGridLayout" name="gridLayout_10">
More information about the Commits
mailing list