]> Zhao Yanbai Git Server - minix.git/commitdiff
Run postinstall script
authorBen Gras <ben@minix3.org>
Mon, 6 Feb 2006 16:17:54 +0000 (16:17 +0000)
committerBen Gras <ben@minix3.org>
Mon, 6 Feb 2006 16:17:54 +0000 (16:17 +0000)
commands/scripts/postinstall.sh [new file with mode: 0644]
commands/scripts/setup.sh

diff --git a/commands/scripts/postinstall.sh b/commands/scripts/postinstall.sh
new file mode 100644 (file)
index 0000000..ffe8e98
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/sh
+echo -n "Would you like to install binary packages from the CD? (y/N) "
+read y
+if [ "$y" = y ]
+then   echo "Ok, showing you a list of packages, please type y"
+       echo "for every package you want installed."
+       /usr/bin/packme
+else   echo "Ok, not installing binary packages."
+fi
+echo "Use the 'packme' command after rebooting MINIX to get another chance"
+echo "to install binary packages."
index bf20eadedf1614016d3771bfd29fb8e86891542d..427d225a1dfc22f8ac27181faaabd44f042557b7 100755 (executable)
@@ -638,7 +638,14 @@ then       if mount /dev/$home /home 2>/dev/null
        fi
 fi
 
-echo "Saving random data.."
+echo "Install is done. Running postinstall script.."
+
+# Now chroot-mount the new system and run the postinstall script
+mount /dev/$root /mnt || exit 1
+mount /dev/$usr /mnt/usr || exit 1
+chroot /mnt '/bin/sh /usr/src/commands/scripts/postinstall.sh'
+
+echo "Postinstall script done. Saving random data.."
 dd if=/dev/random of=/mnt/adm/random.dat bs=1024 count=1
 
 echo "