[Revisor-users] Question about kickstart scripting and chroot
Jason Grant
expires07 at logular.com
Tue Oct 16 06:49:34 UTC 2007
On Sun, 2007-10-14 at 12:44 +0200, Jeroen van Meeuwen wrote:
> Jason Grant wrote:
> > I'm new to chroot'd environments (and python), and am trying to
> > understand what can be done (and also what should be avoided) from
> > within a kickstart %post script. It seems as though the invocation of
> > these scripts from python uses /var/tmp/revisor as a replacement for my
> > system's / directory, and so if I invoke passwd,
> > only /var/tmp/revisor/etc/passwd is manipulated, and the system
> > environment is not damaged. Is this basically how it works?
> >
>
> What you would want to do in %post is further system configuration such
> as adjusting any settings or adding any additional scripts. I bet the
> kickstart configuration files from livecd-tools give you a good example,
> they are in /usr/share/livecd-tools/.
>
> What you wouldn't want to do is edit any settings in /proc or alter any
> files in other filesystems that are mounted upon the loopmount Revisor
> creates, because they are 1) non-persistent but most importantly 2) also
> affect the build system you are running Revisor on.
Thanks Jeroen,
This is as I thought, but it makes the design of the
sample-live-games.ks file seem odd. In the %post phase, an init script
is created that performs operations such as:
1) exists alsaunmute 0 2> /dev/null
2) echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot
3) chkconfig --level 345 crond off
Putting (1) in an init script makes sense to me, since this command
operates on hardware after boot of the live OS. However there seems to
be no need to perform commands like (2) and (3) in an init script, since
these can be done directly during installation in the %post phase.
In fact, I'm now guessing that even the useradd and passwd calls could
be done in the %post phase too, since they should operate correctly in
revisors chroot jail.
Perhaps I am misunderstanding something?
J.
More information about the Revisor-users
mailing list