Echo'ing data to vt3 when running %post
Brian Long
brilong at cisco.com
Tue Aug 30 12:00:18 UTC 2005
On Mon, 2005-08-29 at 20:05 -0400, seth vidal wrote:
> On Mon, 2005-08-29 at 17:22 -0600, Dan Trainor wrote:
> > Hello, all -
> >
> > I have a few applications taht are run during %post, which I've been
> > having trouble with - mainly with data input corruption.
> >
> > I was trying to see if it was possible to echo all output frmo a %post
> > section to vt3, or even better, a file.
> >
> > Anyone know how I can do this?
> >
>
> Something cool I picked up from the admin of the math department here at
> duke:
>
>
> %post --nochroot
> ln -s /mnt/sysimage/etc/termcap /etc/termcap
>
> # download the post.sh into the chroot
> chroot /mnt/sysimage /usr/bin/wget -O /tmp/post.sh \
> http://someplace/post.sh >>/mnt/sysimage/root/foo.output 2>&1
>
>
> chmod +x /mnt/sysimage/tmp/post.sh
> # run it in an xterm
> DISPLAY=:1.0 xterm -geometry 80x25+150+160 -e chroot /mnt/sysimage \
> /tmp/post.sh >>/mnt/sysimage/root/foo.output 2>&1
>
> /bin/rm -f /mnt/sysimage/tmp/post.sh
>
>
>
> so in a graphical install it will pop up the xterm to run your %post :)
This is very cool. I guess I could look at /proc/cmdline to verify the
installer wasn't running with "text", "serial" or "console=ttyS*" before
bringing up the xterm. Right now, I just "chvt 3", run my %post
commands and then "chvt 1" which is broken in graphical installs but
works well on HP Proliants doing text-based installs.
/Brian/
--
Brian Long | | |
IT Data Center Systems | .|||. .|||.
Cisco Linux Developer | ..:|||||||:...:|||||||:..
Phone: (919) 392-7363 | C i s c o S y s t e m s
More information about the Kickstart-list
mailing list