There are other base-install.d hooks that configure things that could also be important, and could potentially be overwritten. I found: console-setup-udeb: /etc/default/console-setup rootskel: /etc/udev/rules.d/ files (netwinder only) There could be others now or later. Suggest the attached changeset. -- see shy jo
From 00b406284bb77a34da1f29805c0336ecac33b490 Mon Sep 17 00:00:00 2001
From: Joey Hess <joey@kodama.kitenet.net>
Date: Wed, 18 Jun 2008 21:26:29 -0400
Subject: [PATCH] redefine base-install.d hooks
live-installer needs these hooks to run after the live system is copied in.
base-installer can get by with running them after deboostrap, and the
existing hooks will work ok if the system is already there.
So, redefine the base-install.d hooks to run after the base system is
extacted, but before the installed system is used in any way (such as
using apt to install additional stuff).
---
installer/doc/devel/available-hooks.txt | 7 ++++---
installer/doc/devel/internals/internals.xml | 2 +-
.../base-installer/debian/bootstrap-base.postinst | 2 +-
packages/base-installer/debian/changelog | 9 +++++++++
packages/live-installer/debian/changelog | 7 +++++++
packages/live-installer/debian/postinst | 2 +-
6 files changed, 23 insertions(+), 6 deletions(-)
diff --git a/installer/doc/devel/available-hooks.txt b/installer/doc/devel/available-hooks.txt
index 7e913a0..e7a3f81 100644
--- a/installer/doc/devel/available-hooks.txt
+++ b/installer/doc/devel/available-hooks.txt
@@ -22,12 +22,13 @@ This list is probably incomplete.
install or not into the target area.
/usr/lib/base-installer.d/* [base-installer]
- The files in this directory are executed in sequence before debootstrap
- is called.
+ The files in this directory are executed in sequence after the base
+ system has been bootstrapped (generally by debootstrap), but before
+ the system is used in any way.
/usr/lib/post-base-installer.d/* [base-installer]
The files in this directory are executed in sequence after debootstrap
- is called.
+ is called (or whatever is used to bootstrap the base system).
/usr/lib/pre-pkgsel.d/* [pkgsel]
The files in this directory are executed in sequence before tasksel
diff --git a/installer/doc/devel/internals/internals.xml b/installer/doc/devel/internals/internals.xml
index 2eb3eba..dbaafc2 100644
--- a/installer/doc/devel/internals/internals.xml
+++ b/installer/doc/devel/internals/internals.xml
@@ -516,7 +516,7 @@ The main hooks are:
<varlistentry>
<term><filename>/usr/lib/base-installer.d</filename></term>
<listitem><para>
-Run by base-installer before debootstrap is started.
+Run by base-installer after system is bootstrapped, but before it is used.
</para></listitem>
</varlistentry>
<varlistentry>
diff --git a/packages/base-installer/debian/bootstrap-base.postinst b/packages/base-installer/debian/bootstrap-base.postinst
index 09e3cf6..dedd3bf 100755
--- a/packages/base-installer/debian/bootstrap-base.postinst
+++ b/packages/base-installer/debian/bootstrap-base.postinst
@@ -126,8 +126,8 @@ install_base_system () {
waypoint 1 check_target
waypoint 1 get_mirror_info
-waypoint 1 pre_install_hooks
waypoint 100 install_base_system
+waypoint 1 pre_install_hooks
waypoint 1 setup_dev
waypoint 1 configure_apt_preferences
waypoint 1 configure_apt
diff --git a/packages/base-installer/debian/changelog b/packages/base-installer/debian/changelog
index f35e3b3..faf687d 100644
--- a/packages/base-installer/debian/changelog
+++ b/packages/base-installer/debian/changelog
@@ -1,3 +1,12 @@
+base-installer (1.92) UNRELEASED; urgency=low
+
+ * Call base-installer.d hooks after running debootstrap, for consistency
+ with live-installer. (So, pre_install_hooks is run after bootstrap, but
+ before anything is installed with apt. So the name still makes a kind
+ of sense, if you squint..)
+
+ -- Joey Hess <joeyh@debian.org> Wed, 18 Jun 2008 21:20:28 -0400
+
base-installer (1.91) unstable; urgency=low
[ Updated translations ]
diff --git a/packages/live-installer/debian/changelog b/packages/live-installer/debian/changelog
index 2ad2913..0ee661f 100644
--- a/packages/live-installer/debian/changelog
+++ b/packages/live-installer/debian/changelog
@@ -1,3 +1,10 @@
+live-installer (6) UNRELEASED; urgency=low
+
+ * Run base-install.d hooks after copying in the life system, to avoid
+ overwriting any files created by them. Closes: #486182
+
+ -- Joey Hess <joeyh@debian.org> Wed, 18 Jun 2008 21:23:06 -0400
+
live-installer (5) unstable; urgency=low
[ Updated translations ]
diff --git a/packages/live-installer/debian/postinst b/packages/live-installer/debian/postinst
index cd3313d..e1e331b 100755
--- a/packages/live-installer/debian/postinst
+++ b/packages/live-installer/debian/postinst
@@ -98,8 +98,8 @@ install_live_system () {
waypoint 1 check_target
waypoint 1 get_mirror_info
-waypoint 1 pre_install_hooks
waypoint 100 install_live_system
+waypoint 1 pre_install_hooks
#waypoint 1 setup_dev
waypoint 1 configure_apt_preferences
waypoint 1 configure_apt
--
1.5.5.4
Attachment:
signature.asc
Description: Digital signature