From 54411682f9d76a9370b22c1c9e8966b8033373c0 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Mon, 6 Nov 2000 15:16:56 +0000 Subject: oem modified to pre-install packages. --- rescue/tree/etc/oem | 36 +++++++++++++++++++++++++++++------- 1 file changed, 29 insertions(+), 7 deletions(-) (limited to 'rescue') diff --git a/rescue/tree/etc/oem b/rescue/tree/etc/oem index fe8abac15..ea715aae2 100755 --- a/rescue/tree/etc/oem +++ b/rescue/tree/etc/oem @@ -2,6 +2,11 @@ [ "$1" = "-f" ] || { echo "Call it with option -f, but don't fear loosing all your data, this command is dangerous!"; exit 1; } +inst=1 +swap=2 +root=3 +langs=fr:en + echo echo echo "I'm going to install the OEM version on your hard drive" @@ -28,15 +33,32 @@ dd if=/etc/part_and_bootloader of=$hd echo "Asking kernel to take into account this new partition table" kernel_read_part $hd -echo "Formatting (ext2) partition" -mkfs.ext2 ${hd}1 +echo "Setting swap" +mkswap $hd$swap +swapon $hd$swap + +echo "Formatting $hd$inst partition" ; mkfs.ext2 $hd$inst +echo "Formatting $hd$root partition" ; mkfs.ext2 $hd$root -echo "Mounting partition" -mkdir /hd ; mount -t ext2 ${hd}1 /hd +echo "Mounting partitions" +mkdir /hd ; mount -t ext2 $hd$inst /hd +mkdir /mnt; mount -t ext2 $hd$root /mnt -echo "Copying cdrom on hard drive" -cp -a /boot /cdrom/boot /cdrom/Mandrake /hd -rm /hd/Mandrake/mdkinst/usr/bin/runinstall2 +echo "Copying installation on hard drive" +mkdir /hd/Mandrake +cp -a /boot /cdrom/boot /hd +cp -a /cdrom/Mandrake/mdkinst /hd/Mandrake + +echo "Installing packages" +export DURING_INSTALL=1 +export RPM_INSTALL_LANG=$langs +export SECURE_LEVEL=2 +for i in /var/lib/rpm /proc ; do mkdir -p /mnt$i; done +mount -t proc proc /mnt/proc +rpm --root /mnt --initdb +for i in `perl -pe 's/ .*//' /cdrom/Mandrake/base/depslist.ordered`; do + rpm --root /mnt -ivh /cdrom/Mandrake/RPMS/$i.*.rpm --nodeps --force +done echo echo "Done. OEM hard drive ready!" -- cgit v1.2.1