2 # This script installs new directories on NFS servers.
4 # The following exit codes are defined and MUST BE CONSISTENT with the
5 # SMS error codes the library uses:
6 set SMS_PROTO = 47836477
8 set path=(/etc /bin /usr/bin /usr/etc)
10 # Find out what device we're working on
13 set USERTAR = /tmp/nfs.dir/proto.tar # Tarfile for user . files
15 # So that the new directories get the right protections.
19 # Do this until there are no more lines of input
21 if ($#input != 4) break
28 # Don't do anything if the directory already exists
32 set tmpdir = $dir:h/_$dir:t
33 # Don't clobber this directory if it exists.
38 # At some point it may be wise to check the status here and
39 # return a soft failure, but the current protocol doesn't
44 if (! -d $tmpdir) continue
45 chown $uid.$gid $tmpdir
47 # At some point, we may wish to add a more elegant way of handling
48 # locker types. The current arrangement allows for easy adding of
49 # default actions here.
53 # ***** Remove this when /etc/encorce_quota becomes obsolete!
54 # Give this filesystem a 1200K quota
55 setquota $dev $uid 1200
58 # Give user prototype files
59 # sms_untar is a setuid argv[1] tar xfp -
60 (cd $tmpdir; sms_untar $uid < $USERTAR)
68 ### Soft failure when ready