No empty .Rs/.Re
[netbsd-mini2440.git] / sys / arch / pmax / dist / get1
blob707cc454c4486e829078ce3e4a51dc79408d43ce
1 #!/bin/sh -
3 # Copyright (c) 1992 The Regents of the University of California.
4 # All rights reserved.
6 # Redistribution and use in source and binary forms, with or without
7 # modification, are permitted provided that the following conditions
8 # are met:
9 # 1. Redistributions of source code must retain the above copyright
10 # notice, this list of conditions and the following disclaimer.
11 # 2. Redistributions in binary form must reproduce the above copyright
12 # notice, this list of conditions and the following disclaimer in the
13 # documentation and/or other materials provided with the distribution.
14 # 3. All advertising materials mentioning features or use of this software
15 # must display the following acknowledgement:
16 # This product includes software developed by the University of
17 # California, Berkeley and its contributors.
18 # 4. Neither the name of the University nor the names of its contributors
19 # may be used to endorse or promote products derived from this software
20 # without specific prior written permission.
22 # THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
23 # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 # ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
26 # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27 # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28 # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 # SUCH DAMAGE.
34 # from: @(#)get1 7.1 (Berkeley) 4/20/92
35 # $Id: get1,v 1.1 1993/10/12 03:22:47 deraadt Exp $
38 # Shell script to build a mini-root file system in preparation for building
39 # a distribution tape. The file system created here is image copied onto
40 # tape, then image copied onto disk as the "first" step in a cold boot o
41 # 4.3 systems.
43 DISTROOT=/usr/obj
44 DISTUSR=/usr/obj/usr.bin
45 DISTSRC=/bsd3/src
47 if [ `pwd` = '/' ]
48 then
49 echo You just '(almost)' destroyed the root
50 exit
52 #cp /tmp/stripped_vmunix vmunix
54 # create necessary directories
55 DIRLIST="bin dev etc a tmp stand sbin usr sys"
56 rm -rf $DIRLIST
57 mkdir $DIRLIST
59 ETC="disktab"
60 for i in $ETC; do
61 cp $DISTSRC/etc/etc.pmax/$i etc/$i
62 done
64 # disklabel
65 SBIN="fsck ifconfig init mknod mount newfs restore \
66 rrestore umount"
67 for i in $SBIN; do
68 cp $DISTROOT/sbin/$i/$i sbin/$i
69 done
71 # ed
72 BIN="test cat cp dd echo expr ls mkdir mv rcp rm sh stty sync"
73 UBIN="awk make mt"
74 for i in $BIN; do
75 cp $DISTROOT/bin/$i/$i bin/$i
76 done
77 #for i in $UBIN; do
78 # cp $DISTUSR/$i/$i bin/$i
79 #done
80 ln bin/stty bin/STTY
81 ln bin/test bin/[
83 #cp /nbsd/sys/floppy/[Ma-z0-9]* sys/floppy
84 #cp /nbsd/sys/consolerl/[Ma-z0-9]* sys/consolerl
85 #cp -r /nbsd/sys/cassette/[Ma-z0-9]* sys/cassette
86 #cp /nbsd/sys/cassette/[Ma-z0-9]* sys/cassette
87 #cp $DISTROOT/boot boot
88 #cp $DISTROOT/pcs750.bin pcs750.bin
89 cp $DISTROOT/.profile .profile
91 cat >etc/passwd <<EOF
92 root::0:10::/:/bin/sh
93 daemon:*:1:1::/:
94 EOF
96 cat >etc/group <<EOF
97 system:*:0:
98 daemon:*:1:
99 uucp:*:2:
100 kmem:*:3:
101 bin:*:4:
102 news:*:8:
103 staff:*:10:
104 operator:*:28:
107 cat >etc/fstab <<EOF
108 /dev/rz0a / ufs rw 1 1
109 /dev/rz0g /usr ufs rw 1 2
112 #cat >xtr <<'EOF'
113 #: ${disk?'Usage: disk=xx0 type=tt tape=yy xtr'}
114 #: ${type?'Usage: disk=xx0 type=tt tape=yy xtr'}
115 #: ${tape?'Usage: disk=xx0 type=tt tape=yy xtr'}
116 #echo 'Build root file system'
117 #newfs ${disk}a ${type}
118 #sync
119 #echo 'Check the file system'
120 #fsck /dev/r${disk}a
121 #mount /dev/${disk}a /a
122 #cd /a
123 #echo 'Rewind tape'
124 #mt -f /dev/${tape}0 rew
125 #echo 'Restore the dump image of the root'
126 #restore rsf 3 /dev/${tape}0
127 #cd /
128 #sync
129 #umount /dev/${disk}a
130 #sync
131 #fsck /dev/r${disk}a
132 #echo 'Root filesystem extracted'
133 #echo
134 #echo 'If this is an 8650 or 8600, update the console rl02'
135 #echo 'If this is a 780 or 785, update the floppy'
136 #echo 'If this is a 730, update the cassette'
137 #EOF
138 #chmod +x xtr
140 cp $DISTSRC/etc/etc.pmax/MAKEDEV dev
141 chmod +x dev/MAKEDEV
142 cp /dev/null dev/MAKEDEV.local
143 cd dev
144 ./MAKEDEV std dc0 rz0 tz0 pm0 pty0
145 cd ..
146 sync