Firstly, I'm new to this mailing list so greetings and thanks to the Debian-Live team for such great work. I have built and used many Debian live images since some years, mostly for pendrive "portable OS" using syslinux. I use mainly Stable but sometimes Sid :

ii  live-boot 3.0~b6-1
ii  live-config 3.0.8-1
kernel 3.2.0-4-686-pae

I could not get my custom live-hooks working in Sid. In Squeeze I set hooks on cmdline with syslinux menu like this :

hooks=file:///live/image/hooks/hookscript

Debug output shows this not recognised (I know already to change that to /lib/live/image for 3.0.8-1):

+ Hooks
+ [ -z  ]
+ return

The man page also the content of 9990-hooks implies that this should be supported.

It is still possible to set hooks in a seperate config.conf file in /live. Even then, this file must appear in /lib/live/image/. If it is in /lib/live/findiso/ it does not seem to work, nor does it from a directory other than /live. Use of /live is a problem in a multiboot setup (where one would use live-media-path=whatever or findiso=path/to/iso)

I got around this here by editing /lib/live/config.sh then rebuilding the image.

This bit, and some others, e.g. locales=whatever (copied from an older version), was added in the "Cmdline ()" function:

=================================================================
# 999-hooks # (now 9990-hooks)
                        live-config.hooks=*|hooks=*)
                                LIVE_HOOKS="${_PARAMETER#*hooks=}"
                                ;;
=================================================================

Then this change, in the "main" function:

********************************************************
# this line is out:
#       for _FILE in /etc/live/config.conf /etc/live/config/* \
#                    /lib/live/image/live/config.conf 
/lib/live/image/live/config/*
# this chunk is in immediately after:

LIVEMEDIADIR=$(cat ${_CMDLINE}|grep -o "live-media-path=.*" |sed 's: .*::' |sed 's:live-media-path=\/::')

if [ -z $LIVEMEDIADIR ]; then
LIVEMEDIADIR=$(cat ${_CMDLINE}|grep -o "findiso=.*" |sed 's: .*::' |sed 's:findiso=\/::')
fi

if [ -z $LIVEMEDIADIR ]; then
LIVEMEDIADIR=live
fi

        for _FILE in /etc/live/config.conf /etc/live/config/* \
/lib/live/image/${LIVEMEDIADIR}/config.conf /lib/live/image/${LIVEMEDIADIR}/config/* \ /lib/live/findiso/${LIVEMEDIADIR}/config.conf /lib/live/findiso/${LIVEMEDIADIR}/config/*

********************************************************

Of course this is a personal (and probabably ugly) hack but at least I can now set my custom hooks on cmdline. It works if findiso. It works also if a config.conf is in the "live-media-path" or "findiso"directory

I see that 3.0.9-1 is now published but no mention of hooks in changelog. Is this a bug, intended behaviour, something unfinished, or have I just missed the point?

David Hare


--
To UNSUBSCRIBE, email to debian-live-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/509ba715.6090...@gmail.com

Reply via email to