| @@ -1,15 +1,15 @@ | | | @@ -1,15 +1,15 @@ |
1 | #!/bin/sh | | 1 | #!/bin/sh |
2 | # $NetBSD: install.sub,v 1.62 2021/06/19 00:54:27 tsutsui Exp $ | | 2 | # $NetBSD: install.sub,v 1.63 2022/03/13 14:20:24 andvar Exp $ |
3 | # | | 3 | # |
4 | # Copyright (c) 1996 The NetBSD Foundation, Inc. | | 4 | # Copyright (c) 1996 The NetBSD Foundation, Inc. |
5 | # All rights reserved. | | 5 | # All rights reserved. |
6 | # | | 6 | # |
7 | # This code is derived from software contributed to The NetBSD Foundation | | 7 | # This code is derived from software contributed to The NetBSD Foundation |
8 | # by Jason R. Thorpe. | | 8 | # by Jason R. Thorpe. |
9 | # | | 9 | # |
10 | # Redistribution and use in source and binary forms, with or without | | 10 | # Redistribution and use in source and binary forms, with or without |
11 | # modification, are permitted provided that the following conditions | | 11 | # modification, are permitted provided that the following conditions |
12 | # are met: | | 12 | # are met: |
13 | # 1. Redistributions of source code must retain the above copyright | | 13 | # 1. Redistributions of source code must retain the above copyright |
14 | # notice, this list of conditions and the following disclaimer. | | 14 | # notice, this list of conditions and the following disclaimer. |
15 | # 2. Redistributions in binary form must reproduce the above copyright | | 15 | # 2. Redistributions in binary form must reproduce the above copyright |
| @@ -1288,27 +1288,27 @@ __install_tape_2 | | | @@ -1288,27 +1288,27 @@ __install_tape_2 |
1288 | ;; | | 1288 | ;; |
1289 | esac | | 1289 | esac |
1290 | ( cd /mnt; dd if=$TAPE | $_xcmd ) | | 1290 | ( cd /mnt; dd if=$TAPE | $_xcmd ) |
1291 | done | | 1291 | done |
1292 | echo "Extraction complete." | | 1292 | echo "Extraction complete." |
1293 | } | | 1293 | } |
1294 | | | 1294 | |
1295 | get_timezone() { | | 1295 | get_timezone() { |
1296 | local _a | | 1296 | local _a |
1297 | local _zonepath | | 1297 | local _zonepath |
1298 | | | 1298 | |
1299 | # | | 1299 | # |
1300 | # If the zoneinfo is not on the installation medium or on the | | 1300 | # If the zoneinfo is not on the installation medium or on the |
1301 | # installed filesystem, set TZ to GMT and return immediatly. | | 1301 | # installed filesystem, set TZ to GMT and return immediately. |
1302 | # | | 1302 | # |
1303 | if [ ! -e /usr/share/zoneinfo ] && [ ! -e /mnt/usr/share/zoneinfo ]; then | | 1303 | if [ ! -e /usr/share/zoneinfo ] && [ ! -e /mnt/usr/share/zoneinfo ]; then |
1304 | TZ=GMT | | 1304 | TZ=GMT |
1305 | return | | 1305 | return |
1306 | fi | | 1306 | fi |
1307 | if [ ! -d /usr/share/zoneinfo ]; then | | 1307 | if [ ! -d /usr/share/zoneinfo ]; then |
1308 | _zonepath=/mnt | | 1308 | _zonepath=/mnt |
1309 | else | | 1309 | else |
1310 | _zonepath="" | | 1310 | _zonepath="" |
1311 | fi | | 1311 | fi |
1312 | | | 1312 | |
1313 | cat << \__get_timezone_1 | | 1313 | cat << \__get_timezone_1 |
1314 | | | 1314 | |
| @@ -1507,27 +1507,27 @@ mount_fs() | | | @@ -1507,27 +1507,27 @@ mount_fs() |
1507 | _fstype=$3 | | 1507 | _fstype=$3 |
1508 | _opt=$4 | | 1508 | _opt=$4 |
1509 | | | 1509 | |
1510 | # If not the root filesystem, make sure the mount | | 1510 | # If not the root filesystem, make sure the mount |
1511 | # point is present. | | 1511 | # point is present. |
1512 | if [ "$_mp" != "/mnt" ]; then | | 1512 | if [ "$_mp" != "/mnt" ]; then |
1513 | mkdir -p $_mp | | 1513 | mkdir -p $_mp |
1514 | fi | | 1514 | fi |
1515 | | | 1515 | |
1516 | # Mount the filesystem. If the mount fails, exit | | 1516 | # Mount the filesystem. If the mount fails, exit |
1517 | # with an error condition to tell the outer | | 1517 | # with an error condition to tell the outer |
1518 | # later to bail. | | 1518 | # later to bail. |
1519 | if ! mount -v -t $_fstype -o async -o $_opt $_dev $_mp ; then | | 1519 | if ! mount -v -t $_fstype -o async -o $_opt $_dev $_mp ; then |
1520 | # error message displated by mount | | 1520 | # error message displayed by mount |
1521 | exit 1 | | 1521 | exit 1 |
1522 | fi | | 1522 | fi |
1523 | done ) < $_fstab | | 1523 | done ) < $_fstab |
1524 | | | 1524 | |
1525 | if [ "$?" != "0" ]; then | | 1525 | if [ "$?" != "0" ]; then |
1526 | cat << \__mount_filesystems_1 | | 1526 | cat << \__mount_filesystems_1 |
1527 | | | 1527 | |
1528 | FATAL ERROR: Cannot mount filesystems. Double-check your configuration | | 1528 | FATAL ERROR: Cannot mount filesystems. Double-check your configuration |
1529 | and restart the installation process. | | 1529 | and restart the installation process. |
1530 | __mount_filesystems_1 | | 1530 | __mount_filesystems_1 |
1531 | exit | | 1531 | exit |
1532 | fi | | 1532 | fi |
1533 | } | | 1533 | } |
| @@ -1560,27 +1560,27 @@ unmount_fs() | | | @@ -1560,27 +1560,27 @@ unmount_fs() |
1560 | kill $_pid | | 1560 | kill $_pid |
1561 | echo "done." | | 1561 | echo "done." |
1562 | fi | | 1562 | fi |
1563 | | | 1563 | |
1564 | ( | | 1564 | ( |
1565 | _devs="" | | 1565 | _devs="" |
1566 | _mps="" | | 1566 | _mps="" |
1567 | # maintain reverse order | | 1567 | # maintain reverse order |
1568 | while read line; do | | 1568 | while read line; do |
1569 | set -- $line | | 1569 | set -- $line |
1570 | _devs="$1 ${_devs}" | | 1570 | _devs="$1 ${_devs}" |
1571 | _mps="$2 ${_mps}" | | 1571 | _mps="$2 ${_mps}" |
1572 | done | | 1572 | done |
1573 | echo -n "Umounting filesystems... " | | 1573 | echo -n "Unmounting filesystems... " |
1574 | for _mp in ${_mps}; do | | 1574 | for _mp in ${_mps}; do |
1575 | echo -n "${_mp} " | | 1575 | echo -n "${_mp} " |
1576 | umount ${_mp} | | 1576 | umount ${_mp} |
1577 | done | | 1577 | done |
1578 | echo "Done." | | 1578 | echo "Done." |
1579 | | | 1579 | |
1580 | if [ $_fast = 0 ]; then | | 1580 | if [ $_fast = 0 ]; then |
1581 | exit | | 1581 | exit |
1582 | fi | | 1582 | fi |
1583 | echo "Checking filesystem integrity..." | | 1583 | echo "Checking filesystem integrity..." |
1584 | for _dev in ${_devs}; do | | 1584 | for _dev in ${_devs}; do |
1585 | echo "${_dev}" | | 1585 | echo "${_dev}" |
1586 | fsck -f ${_dev} | | 1586 | fsck -f ${_dev} |