blob: 819beeb39103b6c7d1434bff12b999fe5bb53b2b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
#!/bin/rc
# desc: move an old third edition plan 9 file system out of the way
# prereq: mountfs
rootfiles=(\
386\
68000\
68020\
LICENSE\
NOTICE\
acme\
adm\
alpha\
arm\
cron\
dist\
fd\
lib\
lp\
mail\
mips\
mnt\
n\
power\
rc\
sparc\
sys\
tmp\
usr/glenda\
wrap\
)
switch($1){
case checkready
if(! test -d /n/kfs/wrap){
moveoldfs=done
export moveoldfs
}
case go
if(test -d /n/kfs/wrap){
echo 'You have a Third Edition Plan 9 installation on '^$fs^'.'
echo 'We need to move the old file system out of the way (into /3e)'
echo 'in order to continue.'
echo
prompt 'Move old file system' y n
switch($rd){
case y
kname=`{kfsname $fs}
log Moving old Plan 9 installation into /3e on kfs
logprog disk/kfscmd -n$kname 'create /3e sys sys 555 d' >>[2]/srv/log
logprog disk/kfscmd -n$kname 'create /3e/usr sys sys 555 d' >>[2]/srv/log
for(i in $rootfiles)
if(test -e /n/kfs/$i)
logprog disk/kfscmd -n$kname 'rename /'^$i^' /3e/'^$i
# copy extant /adm/users in case there have been modifications
logprog disk/kfscmd -n$kname 'create /adm adm adm 555 d' >>[2]/srv/log
logprog cp /n/kfs/3e/adm/users /n/kfs/adm/users >>[2]/srv/log
case n
echo 'Okay, but we can''t continue.'
echo
}
}
case checkdone
if(test -d /n/kfs/wrap){
moveoldfs=notdone
export moveoldfs
}
}
|