[PC-BSD Commits] r5020 - in pcbsd/trunk/pc-sysinstall: . backend

svn at pcbsd.org svn at pcbsd.org
Fri Nov 13 11:38:48 PST 2009


Author: kris
Date: 2009-11-13 11:38:48 -0800 (Fri, 13 Nov 2009)
New Revision: 5020

Modified:
   pcbsd/trunk/pc-sysinstall/backend/functions-users.sh
   pcbsd/trunk/pc-sysinstall/pcinstall.cfg
Log:

Enable auto user login for KDM in pc-sysinstall, this should be among the last of features we needed
for the backend to be feature-complete and ready for testing, horray!



Modified: pcbsd/trunk/pc-sysinstall/backend/functions-users.sh
===================================================================
--- pcbsd/trunk/pc-sysinstall/backend/functions-users.sh	2009-11-13 19:27:59 UTC (rev 5019)
+++ pcbsd/trunk/pc-sysinstall/backend/functions-users.sh	2009-11-13 19:38:48 UTC (rev 5020)
@@ -5,6 +5,22 @@
 . ${BACKEND}/functions-parse.sh
 
 
+# Function which checks and sets up auto-login for a user if specified
+check_autologin()
+{
+  get_value_from_cfg autoLoginUser
+  if [ ! -z "${VAL}"  -a "${INSTALLTYPE}" = "PCBSD" ]
+  then
+    AUTOU="${VAL}"
+    # Add the auto-login user line
+    sed -i.bak "s/AutoLoginUser=/AutoLoginUser=${AUTOU}/g" ${FSMNT}/usr/local/kde4/share/config/kdm/kdmrc
+
+    # Add the auto-login user line
+    sed -i.bak "s/AutoLoginEnable=false/AutoLoginEnable=true/g" ${FSMNT}/usr/local/kde4/share/config/kdm/kdmrc
+
+  fi
+};
+
 # Function which actually runs the adduser command on the filesystem
 add_user()
 {
@@ -126,4 +142,8 @@
 
   done <${CFGF}
 
+
+  # Check if we need to enable a user to auto-login to the desktop
+  check_autologin
+
 };

Modified: pcbsd/trunk/pc-sysinstall/pcinstall.cfg
===================================================================
--- pcbsd/trunk/pc-sysinstall/pcinstall.cfg	2009-11-13 19:27:59 UTC (rev 5019)
+++ pcbsd/trunk/pc-sysinstall/pcinstall.cfg	2009-11-13 19:38:48 UTC (rev 5020)
@@ -46,7 +46,10 @@
 packageType=tar
 commitInstall
 
+# List our components to install
 installComponents=ports,src
+
+# Setup user "kris" to log into the desktop automatically
 autoLoginUser=kris
 
 # Set the root pass



More information about the Commits mailing list