source: trunk/debathena/debathena/debathena-afuse-automounter/debian/mount @ 22909

Revision 22909, 649 bytes checked in by tabbott, 16 years ago (diff)
Initial import of debathena-afuse-automounter.
Line 
1#!/usr/bin/perl
2use strict;
3use warnings;
4
5my ($mountpoint, $name) = @ARGV;
6my %filsys;
7open(HESINFO, '-|', 'hesinfo', '--', $name, 'filsys') or die "can't exec hesinfo: $!";
8while (<HESINFO>) {
9    chomp;
10    my %f; @f{qw(type path rw mount order)} = split / /;
11    %filsys = %f if (($f{order} || 9999) <= ($filsys{order} || 9999));
12}
13close(HESINFO);
14%filsys or die "no locker $name";
15$filsys{type} eq 'AFS' or die "bad type $filsys{type} for locker $name";
16$filsys{path} =~ m|^/afs/| or die "bad path $filsys{path} for locker $name";
17rmdir($mountpoint);
18symlink($filsys{path}, $mountpoint) or die "can't symlink $mountpoint to $filsys{path}: $!";
Note: See TracBrowser for help on using the repository browser.