config root man

Current Path : /usr/src/contrib/amd/scripts/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : //usr/src/contrib/amd/scripts/amd2sun.in

#!@PERL@
# convert amd maps to Sun automount maps
# usage: amd2sun file
#
# Package:	am-utils-6.x
# Author:	"Mark D. Baushke" <mdb@cisco.com>

print "# file created by amd2sun
#
# DO NOT EDIT THIS FILE AT ALL
# It is automatically generated from the amd mount map - edit that instead
#
";
while (<>) {
  print, next if /^#/;
  chop;
  $line = $_;
  while ($line =~ /\\$/) {
    chop $line;
    $line2 = <>;
    $line2 =~ s/^\s*//;
    $line .= $line2;
    chop $line;
  }

  next unless $line =~ /^([^\s]+)\s+(.*)$/;

  $fs = $1; $rest=$2;

  if ($fs =~ /^\/defaults/) {
    ($defopts = $rest) =~ s/^.*[\s;]opts:=([^;\s]+)[;\s]*.*$/\1/;
    next;
  }

  $opts=$defopts;

  if ($rest =~ /opts:=([^;\s]+)[;\s]/) {
    $opts = $1;
  }

  $opts =~ s/,ping=[-\d]+//g;

  ($rhost = $rest) =~ s/^.*[\s;]rhost:=([^;\s]+)[;\s]*.*$/\1/;
  ($rfs   = $rest) =~ s/^.*[\s;]rfs:=([^;\s]+)[;\s]*.*$/\1/;

  if ($rest =~ /sublink:=([^;\s]+)[;\s]/ ) {
    $rfs .= "/$1";
  }

  print "$fs	-$opts	$rhost:$rfs\n";
}

Man Man