diff options
author | Miles Bader <miles@gnu.org> | 1996-06-20 12:30:09 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1996-06-20 12:30:09 +0000 |
commit | 923dcfffdbb1af8179106b82fb4b4ed84210f647 (patch) | |
tree | e898c62bd6cad5b76eff3f2bddb59fa9824f5e48 /SETUP | |
parent | c45594bacc24c92f76d76902f556537ff69a15fa (diff) |
Remove all the complexity and just do the bare minimum.
Diffstat (limited to 'SETUP')
-rw-r--r-- | SETUP | 136 |
1 files changed, 7 insertions, 129 deletions
@@ -1,133 +1,11 @@ #!/bin/bash -# -# Setup initial hurd translators -# -# This script tries to setup a reasonable set of translators for a newly -# untarred hurd filesystem (since tar currently isn't able to do it). -# -# By passing in a value in the environment variable ROOT, an alternate root -# filesystem may be setup. -# +# Setup critical hurd translators -# A list of likely mach devices to try -DISK_DEVS="`eval echo {s,h}d{0,1,2,3,4}{a,b,c,d,e,f,g,h}`" -NET_DEVS="`eval echo {eth,ne,wd,ul}{0,1,2,3,4}`" +set -v -ROOT=${ROOT:-/} -case "$ROOT" in - /) PFX="";; - *) PFX="$ROOT";; -esac +# Set up the PFLOCAL server so we can do pipes +/bin/settrans -c /servers/socket/1 /hurd/pflocal -DEV=${DEV:-/dev} -SERVE=${SERVE:-$PFX/servers} - -PDEV=$PFX$DEV -SOCK=$SERVE/socket - -function st { - /bin/settrans -c "$@" -} -function gt { - /bin/showtrans 2>/dev/null "$@" -} - -# Test to see whether a node has a translator -function tp { - /bin/showtrans -s 2>/dev/null "$@" -} - -# Make a device (MAKEDEV uses $_CWD as the device directory) -function md { - (cd $PDEV && _CWD=$DEV $PDEV/MAKEDEV "$@") -} - -function devs { - /bin/devprobe "$@" -} - -PATH=/bin - -echo '(For most prompts, `none'\'' is also a valid input)' - -# Setup pflocal first, since the shell wants to use it -if tp $SOCK/1; then - echo "PFLOCAL translator present." -else - echo "Setting PFLOCAL translator..." - st $SOCK/1 /hurd/pflocal -fi - -if tp $PDEV/console && tp $PDEV/null && tp $PDEV/fd; then - echo "Standard devices already present." -else - echo "Making standard devices..." - md std -fi - -# See which disk devices might need creating -DISK_DEVS="`devs $DISK_DEVS`" -if test "$DISK_DEVS"; then - echo "Mach disk devices found: `echo $DISK_DEVS`" -else - echo "No mach disk devices found!" -fi - -ALREADY='' -MAYBE='' -for D in $DISK_DEVS; do - if tp $PDEV/r$D; then - ALREADY="${ALREADY:+$ALREADY }$D" - else - MAYBE="${MAYBE:+$MAYBE }$D" - fi -done -if test "$ALREADY"; then - echo "Disk devices with nodes in $PDEV: $ALREADY" -fi -if test "$MAYBE"; then - echo -n "Create device nodes in $PDEV for: [$MAYBE] "; read CREATE - if [ "$CREATE" != none ]; then - md ${CREATE:-$MAYBE} - fi -fi - -NET_DEVS="`devs $NET_DEVS`" -if test "$NET_DEVS"; then - echo "Mach network devices found: $NET_DEVS" -else - echo "No mach network devices found." -fi - -NET_TRANS="`gt $SOCK/2`" -if test "$NET_TRANS"; then - echo "PFINET translator present: $NET_TRANS" - echo -n "Change PFINET translator? [n] "; read yn - case "$yn" in - [Yy]*) - read dummy DEF_NET_ADDR DEF_NET_DEV <<EOF -$NET_TRANS -EOF - ;; - *) - DEF_NET_DEV=skip;; - esac -else - DEF_NET_DEV="`devs -first $NET_DEVS`" - DEF_NET_DEV="${DEF_NET_DEV:-none}" - DEF_NET_ADDR="none" -fi - -if [ "$DEF_NET_DEV" != skip ]; then - echo -n "Network device: [$DEF_NET_DEV] "; read NET_DEV - NET_DEV="${NET_DEV:-$DEF_NET_DEV}" - if [ "$NET_DEV" != none ]; then - echo -n "Network address: [$DEF_NET_ADDR] "; read NET_ADDR - NET_DEV="${NET_DEV:-$DEF_NET_DEV}" - if [ "$NET_ADDR" != none ]; then - st $SOCK/2 /hurd/pfinet $NET_ADDR $NET_DEV - else - echo "PFINET translator not set." - fi - fi -fi +# Setup crucial devices +cd /dev +/bin/sh ./MAKEDEV std |