diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2005-04-02 14:27:09 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2005-04-02 14:27:09 +0000 |
commit | 4da282fe64820c7e0d9627e9e6b4e73fba604258 (patch) | |
tree | ce7289163c7277d8c688a2eab8b747d5e8079a68 /distrib/miniroot/install.sub | |
parent | 14c96fea564383edad67d859b93823c1ed7065be (diff) |
Scrounge a few characters of whitespace.
Diffstat (limited to 'distrib/miniroot/install.sub')
-rw-r--r-- | distrib/miniroot/install.sub | 80 |
1 files changed, 40 insertions, 40 deletions
diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub index e39f2d5260b..80ac60f2362 100644 --- a/distrib/miniroot/install.sub +++ b/distrib/miniroot/install.sub @@ -1,4 +1,4 @@ -# $OpenBSD: install.sub,v 1.369 2005/04/02 13:02:52 krw Exp $ +# $OpenBSD: install.sub,v 1.370 2005/04/02 14:27:08 krw Exp $ # $NetBSD: install.sub,v 1.5.2.8 1996/09/02 23:25:02 pk Exp $ # # Copyright (c) 1997-2005 Todd Miller, Theo de Raadt, Ken Westerback @@ -95,7 +95,7 @@ set_term() { welcome() { local _q - cat << __EOT + cat <<__EOT Welcome to the $OBSD $MODE program. @@ -111,7 +111,7 @@ __EOT # Configure the terminal and keyboard. set_term - cat << __EOT + cat <<__EOT IS YOUR DATA BACKED UP? As with anything that modifies disk contents, this program can cause SIGNIFICANT data loss. @@ -120,7 +120,7 @@ __EOT case $MODE in upgrade) - cat << __EOT + cat <<__EOT NOTE: once your system has been upgraded, you must manually merge any changes to files in the 'etc' set into the files already on your system. @@ -129,14 +129,14 @@ __EOT ;; install) - cat << __EOT + cat <<__EOT It is often helpful to have the installation notes handy. For complex disk configurations, relevant disk hardware manuals and a calculator are useful. __EOT if [ -f /etc/fstab ]; then - cat << __EOT + cat <<__EOT You seem to be trying to restart an interrupted installation! You can skip the disk preparation steps and continue, or you can reboot and start over. @@ -150,7 +150,7 @@ __EOT ask_yn "$_q" if [[ $resp == n ]]; then - cat << __EOT + cat <<__EOT Enter 'halt' at the prompt to gracefully exit OpenBSD. You can then power cycle the machine and boot your original OS. @@ -409,8 +409,8 @@ save_comments() { local _file=$1 if [[ -f /mnt/etc/$_file ]]; then - grep "^#" /mnt/etc/$_file > /tmp/$_file.new - [[ -f /tmp/$_file ]] && cat /tmp/$_file >> /tmp/$_file.new + grep "^#" /mnt/etc/$_file >/tmp/$_file.new + [[ -f /tmp/$_file ]] && cat /tmp/$_file >>/tmp/$_file.new mv /tmp/$_file.new /tmp/$_file fi } @@ -437,7 +437,7 @@ manual_net_cfg() { # log in via ftp to host $1 as user $2 with password $3 # and return a list of all files in the directory $4 on stdout ftp_list_files() { - ftp ${_ftp_active} -V -n "$1" << __EOT + ftp ${_ftp_active} -V -n "$1" <<__EOT user "$2" "$3" cd "$4" ls @@ -485,7 +485,7 @@ select_sets() { while :; do _action= - cat << __EOT + cat <<__EOT The following sets are available. Enter a filename, 'all' to select all the sets, or 'done'. You may de-select a set by prepending a '-' @@ -548,13 +548,13 @@ configure_ifs() { # Get and apply media options. _media=$(ifconfig -m $_ifs | grep "media ") if [[ -n $_media ]]; then - cat << __EOT + cat <<__EOT The media options for $_ifs are currently $(ifconfig -m $_ifs | sed -n '/supported/D;/media:/p') __EOT ask_yn "Do you want to change the media options?" case $resp in - y) cat << __EOT + y) cat <<__EOT Supported media options for $_ifs are: $_media __EOT @@ -606,16 +606,16 @@ v6_info() { dhcp_request() { local _ifs=$1 _hostname=$2 - echo "initial-interval 1;" > /etc/dhclient.conf + echo "initial-interval 1;" >/etc/dhclient.conf if [[ -n $_hostname ]]; then - echo "send host-name \"$_hostname\";" >> /etc/dhclient.conf + echo "send host-name \"$_hostname\";" >>/etc/dhclient.conf echo "Issuing hostname-associated DHCP request for $_ifs." else echo "Issuing free-roaming DHCP request for $_ifs." fi - cat >> /etc/dhclient.conf << __EOT + cat >>/etc/dhclient.conf <<__EOT request subnet-mask, broadcast-address, routers, @@ -624,7 +624,7 @@ request subnet-mask, host-name; __EOT - cat >> /etc/resolv.conf.tail << __EOT + cat >>/etc/resolv.conf.tail <<__EOT lookup file bind __EOT @@ -671,7 +671,7 @@ v4_config() { echo "DHCP not possible - no /sbin/dhclient." elif dhcp_request $_ifs "$_name" || dhcp_request $_ifs ; then addhostent "127.0.0.1" "$_name" - echo "dhcp NONE NONE NONE $_media" >> $_hn + echo "dhcp NONE NONE NONE $_media" >>$_hn fi ;; *) _addr=$resp @@ -679,7 +679,7 @@ v4_config() { ifconfig $_ifs -group dhcp >/dev/null 2>&1 if ifconfig $_ifs inet $_addr netmask $resp up ; then addhostent "$_addr" "$_name" - echo "inet $_addr $resp NONE $_media" > $_hn + echo "inet $_addr $resp NONE $_media" >$_hn fi ;; esac @@ -736,7 +736,7 @@ v4_defroute() { while :; do ask_until "$_prompt" "$_dr" [[ $resp == @(none|dhcp) ]] && break - route delete -inet default > /dev/null 2>&1 + route delete -inet default >/dev/null 2>&1 route -n add -inet -host default "$resp" && { echo "$resp" >/tmp/mygate ; break ; } # Put the old default route back. The new one did not work. route -n add -inet -host default $_dr >/dev/null 2>&1 @@ -883,7 +883,7 @@ enable_network() { # that name must be in /etc/hosts. if [ -f /mnt/etc/mygate ]; then route delete default >/dev/null 2>&1 - route -qn add -host default $(< /mnt/etc/mygate) + route -qn add -host default $(</mnt/etc/mygate) fi # Use loopback, not the wire. @@ -923,7 +923,7 @@ install_files() { if [[ -z $_sets ]]; then # Show $_src, but delete any ftp password. - cat << __EOT + cat <<__EOT No $OBSD sets were found at $(echo $_src | sed -e 's/\(^ftp:\/\/[^/]*\)\(:[^/]*\)\(@.*\)/\1\3/') @@ -1178,7 +1178,7 @@ install_cdrom() { mount $_fstype -o ro /dev/$_drive$_part /mnt2 || return install_mounted_fs /mnt2 "$SETDIR" - umount -f /mnt2 > /dev/null 2>&1 + umount -f /mnt2 >/dev/null 2>&1 } install_disk() { @@ -1195,7 +1195,7 @@ install_disk() { mount $_fstype -o ro,$_fsopts /dev/$_drive$_part /mnt2 || return install_mounted_fs /mnt2 - umount -f /mnt2 > /dev/null 2>&1 + umount -f /mnt2 >/dev/null 2>&1 } install_nfs() { @@ -1225,7 +1225,7 @@ install_nfs() { fi install_mounted_fs /mnt2 - umount -f /mnt2 > /dev/null 2>&1 + umount -f /mnt2 >/dev/null 2>&1 } install_tape() { @@ -1350,7 +1350,7 @@ sane_install() { install_sets() { local _d - cat << __EOT + cat <<__EOT You will now specify the location and names of the $MODE sets you want to load. You will be able to repeat this step until all of your sets have been @@ -1360,7 +1360,7 @@ __EOT while :; do _d= - cat << __EOT + cat <<__EOT Sets can be located on a (m)ounted filesystem; a (c)drom, (d)isk or (t)ape device; or a (f)tp, (n)fs or (h)ttp server. @@ -1423,7 +1423,7 @@ munge_fstab() { # 3) leave out fs_freq and fs_passno fields (i.e. $_rest). echo $_dev /mnt${_mp%/} $_fstype $_opt - done < /tmp/fstab > /etc/fstab + done </tmp/fstab >/etc/fstab # If no /etc/fstab was created, we have nowhere to $MODE to. if [ ! -s /etc/fstab ]; then @@ -1445,7 +1445,7 @@ mount_fs() { # Mount the filesystem. If the mount fails, exit. if ! mount -v -t $_fstype $_async -o $_opt $_dev $_mp ; then # In addition to the error message displayed by mount ... - cat << __EOT + cat <<__EOT FATAL ERROR: Cannot mount filesystems. Double-check your configuration and restart the $MODE. @@ -1453,7 +1453,7 @@ FATAL ERROR: Cannot mount filesystems. Double-check your configuration __EOT exit fi - done < /etc/fstab + done </etc/fstab } # Preen all filesystems in /etc/fstab that have a /sbin/fsck_XXX, @@ -1473,13 +1473,13 @@ check_fs() { _rest=${_dev#/dev/} makedev ${_rest%[a-p]} || continue echo -n "fsck -p ${_dev}..." - if ! fsck -fp ${_dev} > /dev/null 2>&1; then + if ! fsck -fp ${_dev} >/dev/null 2>&1; then echo "FAILED. You must fsck $_dev manually." _fail=y else echo "OK." fi - done < /etc/fstab + done </etc/fstab echo "...done." @@ -1532,9 +1532,9 @@ donetconfig() { # Get/Confirm nameservers, and construct appropriate resolv.conf. ask "DNS nameserver? (IP address or 'none')" "${_ns:=none}" if [[ $resp != none ]]; then - echo "lookup file bind" > /tmp/resolv.conf + echo "lookup file bind" >/tmp/resolv.conf for _ns in $resp; do - echo "nameserver $_ns" >> /tmp/resolv.conf + echo "nameserver $_ns" >>/tmp/resolv.conf done ask_yn "Use the nameserver now?" yes [[ $resp == y ]] && cp /tmp/resolv.conf /tmp/resolv.conf.shadow @@ -1559,13 +1559,13 @@ questions() { ask_yn "Start sshd(8) by default?" yes if [[ $resp == n ]]; then echo "sshd_flags=NO # disabled during install" \ - >> /mnt/etc/rc.conf.local + >>/mnt/etc/rc.conf.local fi ask_yn "Start ntpd(8) by default?" no if [[ $resp == y ]]; then echo "ntpd_flags= # enabled during install" \ - >> /mnt/etc/rc.conf.local + >>/mnt/etc/rc.conf.local fi if [[ -n $MDXAPERTURE ]]; then @@ -1610,7 +1610,7 @@ finish_up() { if grep -qs '^rtsol' /tmp/hostname.*; then sed -e "/^#\(net\.inet6\.ip6\.accept_rtadv\)/s//\1/" \ - /mnt/etc/sysctl.conf > /tmp/sysctl.conf + /mnt/etc/sysctl.conf >/tmp/sysctl.conf cp /tmp/sysctl.conf /mnt/etc/sysctl.conf fi @@ -1632,7 +1632,7 @@ finish_up() { [ -x /mnt/$MODE.site ] && /mnt/usr/sbin/chroot /mnt /$MODE.site # Pat on the back. - cat << __EOT + cat <<__EOT CONGRATULATIONS! Your OpenBSD $MODE has been successfully completed! To boot the new system, enter halt at the command prompt. Once the @@ -1669,7 +1669,7 @@ for _opt in d f l m n p s; do done # Extract and save one boot's worth of dmesg -dmesg | sed -ne '/^OpenBSD /h;/^OpenBSD /!H;${g;p;}' > /var/run/dmesg.boot +dmesg | sed -ne '/^OpenBSD /h;/^OpenBSD /!H;${g;p;}' >/var/run/dmesg.boot # Scan /var/run/dmesg.boot for interesting devices. DKDEVS=$(get_dkdevs) @@ -1710,7 +1710,7 @@ welcome # Get ROOTDISK, ROOTDEV and SWAPDEV. if [[ $MODE == install && ! -f /etc/fstab ]]; then - cat << __EOT + cat <<__EOT You will now initialize the disk(s) that OpenBSD will use. To enable all available security features you should configure the disk(s) to allow the |