summaryrefslogtreecommitdiffstats
path: root/rescue/tree/etc/oem
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-11-06 15:16:56 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-11-06 15:16:56 +0000
commit54411682f9d76a9370b22c1c9e8966b8033373c0 (patch)
tree709d7c31f837cea7f747165bf1f956bdfa606459 /rescue/tree/etc/oem
parent7904779f867950b1bf08e259416eddcf4477a6dc (diff)
downloaddrakx-backup-do-not-use-54411682f9d76a9370b22c1c9e8966b8033373c0.tar
drakx-backup-do-not-use-54411682f9d76a9370b22c1c9e8966b8033373c0.tar.gz
drakx-backup-do-not-use-54411682f9d76a9370b22c1c9e8966b8033373c0.tar.bz2
drakx-backup-do-not-use-54411682f9d76a9370b22c1c9e8966b8033373c0.tar.xz
drakx-backup-do-not-use-54411682f9d76a9370b22c1c9e8966b8033373c0.zip
oem modified to pre-install packages.
Diffstat (limited to 'rescue/tree/etc/oem')
-rwxr-xr-xrescue/tree/etc/oem36
1 files changed, 29 insertions, 7 deletions
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!"