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

Re: [PATCH] support live image dumping



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:          daniel.baumann@panthera-systems.net
Internet:       http://people.panthera-systems.net/~daniel-baumann/


Reply to: