source: trunk/debathena/scripts/installer/pxe/jaunty/debathena-jaunty/postinstall.sh @ 23956

Revision 23956, 1017 bytes checked in by broder, 15 years ago (diff)
Try again to use d-i-utils' chroot setup. This re-implements r23944, hopefully fixing the issues with policy-rc.d collision noted in r23948 by diverting any policy-rc.d file installed by dpkg for the duration of the install.
Line 
1#!/bin/sh
2
3# This is only invoked when the relevant preseed entry is passed in
4# during the preinstall questioning.  (Thus, not for vanilla installs.)
5
6cp /debathena-jaunty/preseed /target/root/debathena.preseed
7cp /debathena-jaunty/install-debathena.sh /target/root
8if test -f /debathena-jaunty/pxe-install-flag ; then
9  cp /debathena-jaunty/pxe-install-flag /target/root/pxe-install-flag
10fi
11
12. /lib/chroot-setup.sh
13
14chroot /target dpkg-divert --rename --add /usr/sbin/policy-rc.d
15if ! chroot_setup; then
16    logger -t postinstall.sh -- "Target system not usable. Can't install Debathena."
17    exit 1
18fi
19
20chvt 5
21chroot /target sh /root/install-debathena.sh < /dev/tty5 > /dev/tty5 2>&1
22# This approach fails due to lingering processes keeping the
23# pipeline open and the script hung.
24# chroot /target sh /root/install-debathena.sh < /dev/tty5 2>&1 \
25#     | chroot /target tee /var/log/athena-install.log > /dev/tty5
26sleep 5
27
28chroot_cleanup
29chroot /target dpkg-divert --rename --remove /usr/sbin/policy-rc.d
30
31chvt 1
Note: See TracBrowser for help on using the repository browser.