[PC-BSD Commits] r19058 - pcbsd/current/src-qt4/pc-firstbootgui

svn at pcbsd.org svn at pcbsd.org
Tue Sep 11 11:48:51 PDT 2012


Author: kris
Date: 2012-09-11 18:48:51 +0000 (Tue, 11 Sep 2012)
New Revision: 19058

Modified:
   pcbsd/current/src-qt4/pc-firstbootgui/firstboot.cpp
Log:

When we create a username, first create the homedir / dataset



Modified: pcbsd/current/src-qt4/pc-firstbootgui/firstboot.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-firstbootgui/firstboot.cpp	2012-09-11 18:27:57 UTC (rev 19057)
+++ pcbsd/current/src-qt4/pc-firstbootgui/firstboot.cpp	2012-09-11 18:48:51 UTC (rev 19058)
@@ -385,6 +385,9 @@
   system("cat " + rfile.fileName().toLatin1() + " | pw usermod root -h 0 ");
   rfile.remove();
 
+  // Create the new home-directory
+  system("/usr/local/share/pcbsd/scripts/mkzfsdir.sh /usr/home/" + lineUsername->text().toLatin1() );
+
   // Create the new username
   QTemporaryFile ufile("/tmp/.XXXXXXXX");
   if ( ufile.open() ) {
@@ -392,7 +395,7 @@
       stream << linePW->text();
     ufile.close();
   }
-  QString userCmd = " | pw useradd -n \"" + lineUsername->text() + "\" -c \"" + lineName->text() + "\" -h 0 -s \"/bin/csh\" -m -d \"/home/" + lineUsername->text() + "\" -G \"wheel,operator\"";
+  QString userCmd = " | pw useradd -n \"" + lineUsername->text() + "\" -c \"" + lineName->text() + "\" -h 0 -s \"/bin/csh\" -m -d \"/usr/home/" + lineUsername->text() + "\" -G \"wheel,operator\"";
   system("cat " + ufile.fileName().toLatin1() + userCmd.toLatin1());
   ufile.remove();
 



More information about the Commits mailing list