Allows to dump a live image skiping the changes required to make it a
regular system. Set live-installer/dump_only to true, to enable it.

Signed-off-by: Otavio Salvador <[EMAIL PROTECTED]>
Tested-by: Daniel Baumann <[EMAIL PROTECTED]>
---
 packages/live-installer/debian/changelog           |    3 +++
 .../live-installer/debian/live-installer.templates |    7 +++++++
 packages/live-installer/debian/postinst            |    6 ++++++
 3 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/packages/live-installer/debian/changelog 
b/packages/live-installer/debian/changelog
index c8f0f36..bc8c2e2 100644
--- a/packages/live-installer/debian/changelog
+++ b/packages/live-installer/debian/changelog
@@ -10,6 +10,9 @@ live-installer (4) UNRELEASED; urgency=low
 
   [ Otavio Salvador ]
   * Clean up postinst to remove unused variables.
+  * Add support to dump a live image skiping the changes required to make
+    it a regular system. Set live-installer/dump_only to true, to enable
+    it.
 
  -- Daniel Baumann <[EMAIL PROTECTED]>  Fri, 29 Feb 2008 15:28:00 +0100
 
diff --git a/packages/live-installer/debian/live-installer.templates 
b/packages/live-installer/debian/live-installer.templates
index d76a4eb..9e0cce9 100644
--- a/packages/live-installer/debian/live-installer.templates
+++ b/packages/live-installer/debian/live-installer.templates
@@ -23,3 +23,10 @@ Type: boolean
 Default: true
 Description: for internal use; can be preseeded
  If false, uses base-installer for installation
+
+Template: live-installer/dump_only
+Type: boolean
+Default: false
+Description: for internal use; can be preseeded
+ If true, it will dump the live image but won't do the needed changes
+ to make it a regular system
diff --git a/packages/live-installer/debian/postinst 
b/packages/live-installer/debian/postinst
index fec6cf8..b476930 100755
--- a/packages/live-installer/debian/postinst
+++ b/packages/live-installer/debian/postinst
@@ -54,6 +54,12 @@ install_live_system () {
                IFS=$OLD_IFS
        done
 
+       # if we're dumping it, we need to set init=live
+       if db_get live-installer/dump_only && [ "$dump_only" = true ]; then
+               db_set debian-installer/add-kernel-opts "init=live"
+               return
+       fi
+
        # run the scripts found in hook directory after copying the system
        partsdir="/usr/lib/live-installer.d"
        if [ -d "$partsdir" ]; then
-- 
1.5.4.3


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to