[PC-BSD Commits] r4236 - in pcbsd/trunk/pc-sysinstall: . backend conf
svn at pcbsd.org
svn at pcbsd.org
Tue Jul 14 14:29:51 PDT 2009
Author: kris
Date: 2009-07-14 14:29:51 -0700 (Tue, 14 Jul 2009)
New Revision: 4236
Added:
pcbsd/trunk/pc-sysinstall/backend/functions-runcommands.sh
Modified:
pcbsd/trunk/pc-sysinstall/backend/parseconfig.sh
pcbsd/trunk/pc-sysinstall/conf/sample-install.cfg
pcbsd/trunk/pc-sysinstall/pcinstall.cfg
Log:
Added functionality to the backend for running command both in and out of chroot during installation
Modified: pcbsd/trunk/pc-sysinstall/backend/parseconfig.sh
===================================================================
--- pcbsd/trunk/pc-sysinstall/backend/parseconfig.sh 2009-07-14 20:30:47 UTC (rev 4235)
+++ pcbsd/trunk/pc-sysinstall/backend/parseconfig.sh 2009-07-14 21:29:51 UTC (rev 4236)
@@ -11,6 +11,7 @@
. ${BACKEND}/functions-mountdisk.sh
. ${BACKEND}/functions-extractimage.sh
. ${BACKEND}/functions-installcomponents.sh
+. ${BACKEND}/functions-runcommands.sh
# Check that the config file exists
if [ ! -e "${1}" ]
@@ -79,6 +80,9 @@
# Check if we have any optional modules to load
install_components
+ # Now run any commands specified
+ run_commands
+
else
# We're going to do an upgrade, skip all the disk setup
# and start by mounting the target drive/slice
Modified: pcbsd/trunk/pc-sysinstall/conf/sample-install.cfg
===================================================================
--- pcbsd/trunk/pc-sysinstall/conf/sample-install.cfg 2009-07-14 20:30:47 UTC (rev 4235)
+++ pcbsd/trunk/pc-sysinstall/conf/sample-install.cfg 2009-07-14 21:29:51 UTC (rev 4236)
@@ -73,3 +73,12 @@
#restoreMedium=ftp
commitRestore
+
+# Run any commands post-install
+# runCommand & runScript are run within chroot of FSMNT
+runCommand=
+# runScript will copy the specified script into FSMNT, and run it in chroot
+runScript=
+# runExtCommand is run on the liveFS
+runExtCommand=
+
Modified: pcbsd/trunk/pc-sysinstall/pcinstall.cfg
===================================================================
--- pcbsd/trunk/pc-sysinstall/pcinstall.cfg 2009-07-14 20:30:47 UTC (rev 4235)
+++ pcbsd/trunk/pc-sysinstall/pcinstall.cfg 2009-07-14 21:29:51 UTC (rev 4236)
@@ -31,3 +31,10 @@
installComponents=ports,src
commitInstall
+# Run any commands post-install
+runCommand=echo 'root' | pw usermod root -h 0
+runScript=/root/test.sh
+runExtCommand=echo 'hey there'; touch $FSMNT/touched
+
+autoLoginUser=kris
+
More information about the Commits
mailing list