]> andersk Git - moira.git/blob - gen/nfs.sh
removed nested comments so that saber will be happy
[moira.git] / gen / nfs.sh
1 #!/bin/csh -f
2 set path=(/bin /usr/bin /etc /usr/etc )
3 set TARFILE=/tmp/nfs
4 set TMPDIR=/tmp/nfs.dir
5
6 if ( ! -d $TMPDIR ) then
7         rm -f $TMPDIR
8         mkdir $TMPDIR
9         chmod 755 $TMPDIR
10 endif
11
12 cd $TMPDIR
13 tar xf $TARFILE
14 if ($status) exit 1
15
16 set uchost=`hostname|tr a-z A-Z`.MIT.EDU
17 set uchostrev=`echo $uchost | rev`
18
19 foreach i ( ${uchost}* )
20         set t1=`echo $i | rev`
21         set dev=`basename $t1 :$uchostrev | rev | sed 's;@;/;g'`
22
23         echo ${uchost}:$dev
24
25         ./install_fs $dev < $i
26 end
27
28 # build new credentials file.
29 rm -f /usr/etc/credentials.new
30 cp credentials /usr/etc/credentials.new
31 if ($status) exit 1
32
33 /usr/etc/mkcred /usr/etc/credentials.new
34 if ($status) exit 1
35
36 foreach e ( "" .dir .pag)
37         mv /usr/etc/credentials.new$e /usr/etc/credentials$e
38 end
39
This page took 0.037223 seconds and 5 git commands to generate.