source: trunk/debathena/scripts/installer/pxe/precise/debathena/postinstall.sh @ 25486

Revision 25486, 1.5 KB checked in by jdreed, 12 years ago (diff)
Initial checkin of precise installer. netconfig and related code has been removed. clusteraddr command-line argument has been de-supported.
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/preseed /target/root/debathena.preseed
7cp /debathena/install-debathena.sh /target/root
8if test -f /debathena/pxe-install-flag ; then
9  cp /debathena/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
21
22# Something like this approach was once said to fail due to lingering
23# processes keeping the pipeline open and the script hung.  According to
24# trac#225 this doesn't happen any more.
25(chroot /target sh /root/install-debathena.sh < /dev/tty5 2>&1 \
26     && touch /debathena/install-succeeded) \
27     | chroot /target tee /var/log/athena-install.log > /dev/tty5
28
29if ! [ -e /debathena/install-succeeded ]; then
30  echo "WARNING: your debathena postinstall has returned an error;" > /dev/tty5
31  echo "see above for details." > /dev/tty5
32  echo > /dev/tty5
33  echo "This shell is provided for debugging purposes.  When you exit" > /dev/tty5
34  echo "the shell, your system will reboot into the newly-installed"  > /dev/tty5
35  echo "system, though depending on the failure you may see continuing issues." > /dev/tty5
36  /bin/sh < /dev/tty5 > /dev/tty5 2>&1
37fi
38
39sleep 5
40
41chroot_cleanup
42chroot /target dpkg-divert --rename --remove /usr/sbin/policy-rc.d
43
44chvt 1
Note: See TracBrowser for help on using the repository browser.