Heavily customized Live-CD
> > You can probably do all this with a hook script. Add the script you
> > want to run in your LIVE_INCLUDE_CHROOT directory and set the
> > LIVE_HOOK variable. Assuming you have your LIVE_INCLUDE_CHROOT set
> > to /some/path/inc-root, write your script
> > in /some/path/inc-root/hook.sh and set LIVE_HOOK="/hook.sh". It will
> > be called in a chrooted environment. To do this cleanly, add
> > rm /hook.sh at the end of your script.
>
> I did look at the LIVE_HOOK variable. When exactly is it being run?
> AFAIU the xorg.conf is generated when booting the live cd.
It's called just after the packages installation. And yes you have a problem
here :) I can't really help because I don't know how the xorg config works,
but I guess the solution is to setup an init.d script which will be called at
boot time too. As an example, I'm using the following hook to setup my usb
key as casper's home (see man update-rc.d for more infos) :
# --------------------------------------------------------------------------
name=setup-casper-home.sh
script=/etc/init.d/${name}
cat > "$script" <<EOF
. /lib/lsb/init-functions
case "\$1" in
start)
log_daemon_msg "Setting up casper home"
if ! grep "^LABEL=CASPER-HOME" /etc/fstab >/dev/null; then
echo 'LABEL=CASPER-HOME /home/casper ext3 defaults' >> /etc/fstab
fi
mount /home/casper >/dev/null || true
chown -R casper: /home/casper
log_action_end_msg 0
;;
esac
EOF
chmod +x "$script"
update-rc.d "$name" start 90 1 2 3 4 5 .
# --------------------------------------------------------------------------
You can probably do something similar to hack your xorg.conf. Make sure you
use a NN code high enough to be sure it will come after the default xorg
config, but lower than 99 which is the code for kdm/xdm starting.
--
C?dric Lucantis
Reply to: