[24358] in Source-Commits

home help back first fref pref prev next nref lref last post

/svn/athena r23956 - trunk/debathena/scripts/installer/pxe/jaunty/debathena-jaunty

daemon@ATHENA.MIT.EDU (Evan Broder)
Sat Aug 8 03:15:33 2009

Date: Sat, 8 Aug 2009 03:15:21 -0400
From: Evan Broder <broder@MIT.EDU>
Message-Id: <200908080715.n787FLcU010781@drugstore.mit.edu>
To: source-commits@mit.edu
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Author: broder
Date: 2009-08-08 03:15:20 -0400 (Sat, 08 Aug 2009)
New Revision: 23956

Modified:
   trunk/debathena/scripts/installer/pxe/jaunty/debathena-jaunty/postinstall.sh
Log:
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.



Modified: trunk/debathena/scripts/installer/pxe/jaunty/debathena-jaunty/postinstall.sh
===================================================================
--- trunk/debathena/scripts/installer/pxe/jaunty/debathena-jaunty/postinstall.sh	2009-08-06 22:12:55 UTC (rev 23955)
+++ trunk/debathena/scripts/installer/pxe/jaunty/debathena-jaunty/postinstall.sh	2009-08-08 07:15:20 UTC (rev 23956)
@@ -9,6 +9,14 @@
   cp /debathena-jaunty/pxe-install-flag /target/root/pxe-install-flag
 fi
 
+. /lib/chroot-setup.sh
+
+chroot /target dpkg-divert --rename --add /usr/sbin/policy-rc.d
+if ! chroot_setup; then
+    logger -t postinstall.sh -- "Target system not usable. Can't install Debathena."
+    exit 1
+fi
+
 chvt 5
 chroot /target sh /root/install-debathena.sh < /dev/tty5 > /dev/tty5 2>&1
 # This approach fails due to lingering processes keeping the
@@ -16,4 +24,8 @@
 # chroot /target sh /root/install-debathena.sh < /dev/tty5 2>&1 \
 #     | chroot /target tee /var/log/athena-install.log > /dev/tty5
 sleep 5
+
+chroot_cleanup
+chroot /target dpkg-divert --rename --remove /usr/sbin/policy-rc.d
+
 chvt 1


home help back first fref pref prev next nref lref last post