[Debian-live-changes] r1921 - in dists/trunk/live-helper: docs helpers

daniel at alioth.debian.org daniel at alioth.debian.org
Sat Jun 2 17:41:01 UTC 2007


Author: daniel
Date: 2007-06-02 17:41:00 +0000 (Sat, 02 Jun 2007)
New Revision: 1921

Added:
   dists/trunk/live-helper/helpers/lh_chroot_preseed
Modified:
   dists/trunk/live-helper/docs/ChangeLog
   dists/trunk/live-helper/helpers/lh_chroot
Log:


Modified: dists/trunk/live-helper/docs/ChangeLog
===================================================================
--- dists/trunk/live-helper/docs/ChangeLog	2007-06-02 17:24:27 UTC (rev 1920)
+++ dists/trunk/live-helper/docs/ChangeLog	2007-06-02 17:41:00 UTC (rev 1921)
@@ -4,6 +4,7 @@
 	  - Add support to override helpers base directory
 	  - Use LIVE_BOOTSTRAP_CONFIG instead of LIVE_DISTRIBUTION_CONFIG.
 	  - Add support to specify the keyring to be used while bootstraping.
+	  - Add lh_chroot_preseed helper.
 
 2007-05-28  Daniel Baumann  <daniel at debian.org>
 

Modified: dists/trunk/live-helper/helpers/lh_chroot
===================================================================
--- dists/trunk/live-helper/helpers/lh_chroot	2007-06-02 17:24:27 UTC (rev 1920)
+++ dists/trunk/live-helper/helpers/lh_chroot	2007-06-02 17:41:00 UTC (rev 1921)
@@ -42,6 +42,7 @@
 lh_chroot_linux-image install ${*}
 
 # Customizing chroot
+lh_chroot_preseed ${*}
 lh_chroot_tasks ${*}
 lh_chroot_packageslists ${*}
 lh_chroot_packages ${*}

Added: dists/trunk/live-helper/helpers/lh_chroot_preseed
===================================================================
--- dists/trunk/live-helper/helpers/lh_chroot_preseed	                        (rev 0)
+++ dists/trunk/live-helper/helpers/lh_chroot_preseed	2007-06-02 17:41:00 UTC (rev 1921)
@@ -0,0 +1,76 @@
+#!/bin/sh
+
+# lh_chroot_preseed(1) - mount /proc
+# Copyright (C) 2006-2007 Daniel Baumann <daniel at debian.org>
+#
+# live-helper comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
+# This is free software, and you are welcome to redistribute it
+# under certain conditions; see COPYING for details.
+
+set -e
+
+# Including common functions
+for FUNCTION in ${LH_BASE-:/usr/share/live-helper}/functions/*.sh
+do
+	. "${FUNCTION}"
+done
+
+# Setting static variables
+DESCRIPTION="execute preseed in chroot"
+HELP=""
+USAGE="${PROGRAM} [--force]"
+
+Arguments "${@}"
+
+# Reading configuration files
+Read_conffile config/common
+Read_conffile config/bootstrap
+Read_conffile config/chroot
+Read_conffile config/binary
+Read_conffile config/source
+Set_defaults
+
+Echo_message "Begin executing preseed..."
+
+# Requiring stage file
+Require_stagefile .stage/bootstrap
+
+# Checking stage file
+Check_stagefile .stage/chroot_preseed
+
+# Checking lock file
+Check_lockfile .lock
+
+# Creating lock file
+Create_lockfile .lock
+
+if [ -n "${LIVE_PRESEED}" ]
+then
+	if [ -f "${LIVE_PRESEED}" ]
+	then
+		# Installing debconf-utils
+		case "${LH_APT}" in
+			apt|apt-get)
+				Chroot "apt-get install --yes debconf-utils"
+				;;
+
+			aptitude)
+				Chroot "aptitude install --assume-yes debconf-utils"
+				;;
+		esac
+
+		# Copying preseed
+		cp "${LIVE_PRESEED}" chroot/root/preseed
+
+		Chroot "debconf-set-selections /root/preseed"
+
+		# Removing preseed file
+		rm -f chroot/root/preseed
+
+		# Creating stage file
+		Create_stagefile .stage/chroot_preseed
+	fi
+else
+	Echo_error "'${LIVE_PRESEED}' file doesn't exists."
+	exit 1
+fi


Property changes on: dists/trunk/live-helper/helpers/lh_chroot_preseed
___________________________________________________________________
Name: svn:executable
   + *




More information about the Debian-live-changes mailing list