[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[PATCH] allow setting of an specific script to be used by debootstrap



It's possible to use a specific script by preseeding
base-installer/script. That's a very interesting feature for Custom
Debian Distributions and derivatives to avoid to maintain a fork of
debootstrap package.
---
 .../base-installer/debian/bootstrap-base.postinst  |    4 ++++
 .../base-installer/debian/bootstrap-base.templates |    5 +++++
 packages/base-installer/debian/changelog           |    3 +++
 3 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/packages/base-installer/debian/bootstrap-base.postinst b/packages/base-installer/debian/bootstrap-base.postinst
index fef7348..f38139b 100755
--- a/packages/base-installer/debian/bootstrap-base.postinst
+++ b/packages/base-installer/debian/bootstrap-base.postinst
@@ -17,6 +17,9 @@ INCLUDES="$(printf '%s' "$RET" | sed 's/ /,/g')" || true
 db_get base-installer/excludes
 EXCLUDES="$(printf '%s' "$RET" | sed 's/ /,/g')" || true
 
+# Check if a specific script should be used
+db_get base-installer/debootstrap_script
+DEBOOTSTRAP_SCRIPT="$RET" || true
 
 # Avoid debconf sending email during the base install process
 DEBCONF_ADMIN_EMAIL=""
@@ -102,6 +105,7 @@ install_base_system () {
 			${include} ${exclude} \
 			${keyring} \
 			${DISTRIBUTION} /target \
+			${DEBOOTSTRAP_SCRIPT} \
 			"$PROTOCOL://$MIRROR$DIRECTORY" \
 			|| debootstrap_failed=$?
 	fi
diff --git a/packages/base-installer/debian/bootstrap-base.templates b/packages/base-installer/debian/bootstrap-base.templates
index 524312c..f1b2571 100644
--- a/packages/base-installer/debian/bootstrap-base.templates
+++ b/packages/base-installer/debian/bootstrap-base.templates
@@ -369,3 +369,8 @@ Template: base-installer/excludes
 Type: string
 Description: for internal use; can be preseeded
  Packages to be excluded in base installation
+
+Template: base-installer/debootstrap_script
+Type: string
+Description: for internal use; can be preseeded
+ Force use of a specific debootstrap script
diff --git a/packages/base-installer/debian/changelog b/packages/base-installer/debian/changelog
index 2313efc..104a719 100644
--- a/packages/base-installer/debian/changelog
+++ b/packages/base-installer/debian/changelog
@@ -15,6 +15,9 @@ base-installer (1.89) UNRELEASED; urgency=low
     preseeding base-installer/includes and base-installer/excludes. Adding
     packages using base_include and base_include CD files still works and
     the packages are added to the preseeded ones.
+  * Add facility to use a specific script by preseeding
+    base-installer/script. That's a very interesting feature for Custom
+    Debian Distributions and derivatives.
 
  -- Frans Pop <fjp@debian.org>  Mon, 18 Feb 2008 16:21:34 +0100
 
-- 
1.5.4.3


Reply to: