"Boylan, Ross" <ross.boy...@ucsf.edu> writes:

> Thanks for the pointers.  But is it really true that the 2 pieces of code 
> don't rely on the rest?  They have
> . /tmp/HandsOff-dbg-fn.sh
> . /tmp/HandsOff-fn.sh

Actually, I was making it more complicated than it need be, just because
I happened to have been looking at those scripts recently.

The right way to do this is almost certainly by creating a new hook
script, in an early script -- see:

  http://d-i.alioth.debian.org/doc/internals/apb.html#ap-hooks-general

Here's an ancient example of doing that:

  http://hands.com/d-i/lenny/classes/koolu/early_script.disabled

so pick the point in the install that you want to edit the passwd file,
and just create a script in one of the hooks that will do that for you.

If you're not sure which hook will suit best, start out by creating a
few scripts that just contain:

  #!/bin/sh
  sleep 10001 || true

(BTW I generally make each sleep have different last digit(s) so I can
easily tell what's going on with:  ps | grep sleep  )

Then you can look around (on the Ctrl-Alt-F2 console) to see if the
conditions are right for what you want to do, and if not, e.g. the
/etc/passwd file's not yet been created, then kill the sleep and let it
run on to the next one.

Once you find a nice spot in the install, just change your early command
to create a script that does what you want.

Cheers, Phil.
-- 
|)|  Philip Hands  [+44 (0)20 8530 9560]  HANDS.COM Ltd.
|-|  http://www.hands.com/    http://ftp.uk.debian.org/
|(|  Hugo-Klemm-Strasse 34,   21075 Hamburg,    GERMANY

Attachment: pgpcJCHhlsNf2.pgp
Description: PGP signature

Reply via email to