Re: [PATCH] support live image dumping

2008-03-01 Thread Otavio Salvador
Daniel Baumann <[EMAIL PROTECTED]> writes:

> Otavio Salvador wrote:
>>  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(-)
>
> this one works too, please commit.

A new variation is being cooked up to allow a installation mode
selection in expert mode. Will post it soon.

-- 
O T A V I OS A L V A D O R
-
 E-mail: [EMAIL PROTECTED]  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
"Microsoft sells you Windows ... Linux gives
 you the whole house."


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



Re: [PATCH] support live image dumping

2008-03-01 Thread Daniel Baumann
Otavio Salvador wrote:
>  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(-)

this one works too, please commit.

> diff --git a/packages/live-installer/debian/postinst 
> b/packages/live-installer/debian/postinst
> index fec6cf8..2afdf72 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 && [ "$RET" = 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

I'd prefere this one for etch compat:

--- debian/postinst (revision 51641)
+++ debian/postinst (working copy)
@@ -54,6 +54,17 @@
IFS=$OLD_IFS
done

+   # if we're dumping it, we need to set init=live
+   if db_get live-installer/dump_only && [ "$RET" = true ]; then
+   if [ -d /cdrom/live ]; then
+   db_set debian-installer/add-kernel-opts "init=live"
+   elif [ -d /cdrom/casper ]; then
+   db_set debian-installer/add-kernel-opts
"init=casper"
+   fi
+
+   return
+   fi
+
# run the scripts found in hook directory after copying the system
partsdir="/usr/lib/live-installer.d"
if [ -d "$partsdir" ]; then

-- 
Address:Daniel Baumann, Burgunderstrasse 3, CH-4562 Biberist
Email:  [EMAIL PROTECTED]
Internet:   http://people.panthera-systems.net/~daniel-baumann/


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



[PATCH] support live image dumping

2008-03-01 Thread Otavio Salvador
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.
---
 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..2afdf72 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 && [ "$RET" = 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]



[PATCH] support live image dumping

2008-03-01 Thread Otavio Salvador
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]