From 5ed793ce20cb86775cfa6b591136577b48b5a358 Mon Sep 17 00:00:00 2001 From: Ben Gras Date: Sun, 11 Sep 2005 17:20:30 +0000 Subject: [PATCH] Another setup check --- commands/scripts/setup.sh | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/commands/scripts/setup.sh b/commands/scripts/setup.sh index ebd62d4db..5b6089e43 100755 --- a/commands/scripts/setup.sh +++ b/commands/scripts/setup.sh @@ -14,6 +14,8 @@ ROOTMB=16 ROOTSECTS="`expr $ROOTMB '*' 1024 '*' 2`" USRKB="`cat /.usrkb`" TOTALMB="`expr 3 + $USRKB / 1024 + $ROOTMB`" +ROOTFILES="`cat /.rootfiles`" +USRFILES="`cat /.usrfiles`" if [ "$TOTALMB" -lt 1 ] then @@ -22,6 +24,20 @@ then exit 1 fi +if [ "$ROOTFILES" -lt 1 ] +then + echo "Are you really running from CD?" + echo "Something wrong with root files count on CD." + exit 1 +fi + +if [ "$USRFILES" -lt 1 ] +then + echo "Are you really running from CD?" + echo "Something wrong with usr files count on CD." + exit 1 +fi + PATH=/bin:/usr/bin export PATH @@ -452,8 +468,7 @@ echo "" mount /dev/$usr /mnt >/dev/null || exit # Mount the intended /usr. -files="`cat /.usrfiles`" -cpdir -v /usr /mnt | progressbar "$files" || exit # Copy the usr floppy. +cpdir -v /usr /mnt | progressbar "$USRFILES" || exit # Copy the usr floppy. # Set inet.conf to correct driver @@ -467,8 +482,7 @@ umount /dev/$usr >/dev/null || exit # Unmount the intended /usr. mount /dev/$root /mnt >/dev/null || exit # Running from the installation CD. -files="`cat /.rootfiles`" -cpdir -vx / /mnt | progressbar "$files" || exit +cpdir -vx / /mnt | progressbar "$ROOTFILES" || exit if [ -n "$driver" ] then echo "eth0 $driver 0 { default; };" >/mnt/etc/inet.conf -- 2.44.0