Disable twiddle() as it causes problems on some architectures
authortholo <tholo@openbsd.org>
Sat, 3 May 1997 23:06:01 +0000 (23:06 +0000)
committertholo <tholo@openbsd.org>
Sat, 3 May 1997 23:06:01 +0000 (23:06 +0000)
Actually install machine dependant sets if there are any specified
Special-case a set named "kernel" so that it will copy "bsd" to the root
disk

distrib/miniroot/install.sh
distrib/miniroot/install.sub
distrib/miniroot/upgrade.sh

index 259e755..1835221 100644 (file)
@@ -1,5 +1,5 @@
 #!/bin/sh
-#      $OpenBSD: install.sh,v 1.6 1997/05/02 20:56:17 grr Exp $
+#      $OpenBSD: install.sh,v 1.7 1997/05/03 23:06:01 tholo Exp $
 #      $NetBSD: install.sh,v 1.5.2.8 1996/08/27 18:15:05 gwr Exp $
 #
 # Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -72,7 +72,7 @@ MODE="install"
 . install.sub
 
 # which sets?
-THESETS="$ALLSETS"
+THESETS="$ALLSETS $MDSETS"
 
 if [ "`df /`" = "`df /mnt`" ]; then
        # Good {morning,afternoon,evening,night}.
@@ -403,7 +403,7 @@ mount | while read line; do
        fi
 done
 
-install_sets $ALLSETS $MDSETS
+install_sets $THESETS
 
 # Copy in configuration information and make devices in target root.
 
@@ -451,10 +451,10 @@ if [ ! -x /mnt/dev/MAKEDEV ]; then
 fi
 
 echo -n "Making all devices..."
-pid=`twiddle`
+#pid=`twiddle`
 cd /mnt/dev
 sh MAKEDEV all
-kill $pid
+#kill $pid
 echo "done."
 cd /
 
index 998aa13..38b80a5 100644 (file)
@@ -1,5 +1,5 @@
 #!/bin/sh
-#      $OpenBSD: install.sub,v 1.9 1997/05/03 07:45:10 tholo Exp $
+#      $OpenBSD: install.sub,v 1.10 1997/05/03 23:06:02 tholo Exp $
 #      $NetBSD: install.sub,v 1.5.2.8 1996/09/02 23:25:02 pk Exp $
 #
 # Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -179,6 +179,10 @@ dir_has_sets() {
                if [ -f $_dir/${_file}.tgz ]; then
                        return 0
                fi
+               # Special check for kernel
+               if [ $_file = "kernel" -a -f $_dir/bsd ]; then
+                       return 0
+               fi
        done
        return 1
 }
@@ -618,12 +622,17 @@ __install_ftp_2
                fi
 
                for _ftp_file in $resp; do
-                       echo -n "get " >> /tmp/ftp-script.sh
-                       echo -n "${_ftp_file}" | \
-                           sed "/\./!s/\$/${VERSION}.tar.gz/" >> \
-                               /tmp/ftp-script.sh
-                       echo " |\"tar -zxvpf -\"" >> \
-                           /tmp/ftp-script.sh
+                       if [ "X${resp}" = "Xkernel" ]; then
+                               echo -n "get " >> /tmp/ftp-script.sh
+                               echo "bsd" >> /tmp/ftp-script.sh
+                       else
+                               echo -n "get " >> /tmp/ftp-script.sh
+                               echo -n "${_ftp_file}" | \
+                                   sed "/\./!s/\$/${VERSION}.tar.gz/" >> \
+                                       /tmp/ftp-script.sh
+                               echo " |\"tar -zxvpf -\"" >> \
+                                   /tmp/ftp-script.sh
+                       fi
                done
        done
 
@@ -647,7 +656,7 @@ __install_ftp_3
        esac
        
        echo -n "submit ftp script? [y] "
-       getresp "n"
+       getresp "y"
        case "$resp" in
        y*|Y*)
                sh /tmp/ftp-script.sh
@@ -666,11 +675,14 @@ install_from_mounted_fs() {
        local _sets
        local _next
        local _f
+       local _kernel
 
        _sets=""
        if dir_has_sets $1 $THESETS; then
                for _f in $THESETS ; do
-                       if [ -f $1/${_f}.tar.gz ]; then
+                       if [ "X${_f}" = "Xkernel" ]; then
+                               _kernel=bsd
+                       elif [ -f $1/${_f}.tar.gz ]; then
                                _sets="$_sets ${_f}.tar.gz"
                        elif [ -f $1/${_f}.tgz ]; then
                                _sets="$_sets ${_f}.tgz"
@@ -687,7 +699,7 @@ install_from_mounted_fs() {
                echo ""
 
                _next=""
-               for _f in $_sets ; do
+               for _f in $_sets $_kernel ; do
                        if isin $_f $_setsdone; then
                                echo -n "[X] "
                                _next=""
@@ -720,7 +732,11 @@ install_from_mounted_fs() {
                fi
 
                # Extract file
-               cat $_filename | (cd /mnt; tar -zxvpf -)
+               if [ $_f = $_kernel ]; then
+                       cp $_filename /mnt/$_f
+               else
+                       cat $_filename | (cd /mnt; tar -zxvpf -)
+               fi
                echo "Extraction complete."
                _setsdone="$_f $_setsdone"
 
@@ -1344,9 +1360,9 @@ unmount_fs()
 
        if [ $_fast = 0 ]; then
                echo -n "Syncing disks..."
-               _pid=`twiddle`
+               #_pid=`twiddle`
                sync; sleep 4; sync; sleep 2; sync; sleep 2
-               kill $_pid
+               #kill $_pid
                echo    "done."
        fi
 
index 8143e46..b176fdf 100644 (file)
@@ -1,5 +1,5 @@
 #!/bin/sh
-#      $OpenBSD: upgrade.sh,v 1.4 1997/04/30 18:52:50 niklas Exp $
+#      $OpenBSD: upgrade.sh,v 1.5 1997/05/03 23:06:02 tholo Exp $
 #      $NetBSD: upgrade.sh,v 1.2.4.5 1996/08/27 18:15:08 gwr Exp $
 #
 # Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@ MODE="upgrade"
 . install.sub
 
 # which sets?
-THESETS="$UPGRSETS"
+THESETS="$UPGRSETS $MDSETS"
 
 # Good {morning,afternoon,evening,night}.
 md_welcome_banner
@@ -241,7 +241,7 @@ case "$resp" in
 esac
 
 # Install sets.
-install_sets
+install_sets $THESETS
 
 # Get timezone info
 get_timezone
@@ -287,10 +287,10 @@ esac
        echo "done."
 
        echo -n "Making devices..."
-       _pid=`twiddle`
+       #_pid=`twiddle`
        cd /mnt/dev
        sh MAKEDEV all
-       kill $_pid
+       #kill $_pid
        echo "done."
 
        md_copy_kernel