From: Ben Gras Date: Mon, 6 Feb 2006 16:17:54 +0000 (+0000) Subject: Run postinstall script X-Git-Tag: v3.1.2a~373 X-Git-Url: http://zhaoyanbai.com/repos/Bv9ARM.ch03.html?a=commitdiff_plain;h=b561091d13f082ab1e5dd1290c2886c2212e3e92;p=minix.git Run postinstall script --- diff --git a/commands/scripts/postinstall.sh b/commands/scripts/postinstall.sh new file mode 100644 index 000000000..ffe8e986f --- /dev/null +++ b/commands/scripts/postinstall.sh @@ -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." diff --git a/commands/scripts/setup.sh b/commands/scripts/setup.sh index bf20eaded..427d225a1 100755 --- a/commands/scripts/setup.sh +++ b/commands/scripts/setup.sh @@ -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 "