From: Sapan Bhatia Date: Thu, 19 Mar 2009 18:54:01 +0000 (+0000) Subject: Trying to repair dfferences b/w the merge X-Git-Tag: vsys-0.9-0~36 X-Git-Url: http://git.onelab.eu/?p=vsys.git;a=commitdiff_plain;h=950571c5a0e5cf3492a2b1f51637112f27afd754 Trying to repair dfferences b/w the merge --- diff --git a/nfsmount b/nfsmount new file mode 100755 index 0000000..04115dc --- /dev/null +++ b/nfsmount @@ -0,0 +1,51 @@ +#!/usr/bin/perl + +use strict; + +my $slicename=$ARGV[0]; +my $already_mounted_testfile = "/tmp/$slicename"."_nfsmounted"; + +my $slice_dir="/vservers/$slicename/"; + +if (-f $already_mounted_testfile) { + die("Sorry, only one successful NFS mount allowed per slice!"); +} + +my $remotepath = ; +my $localpath = ; +chomp($localpath); +chomp($remotepath); +$localpath=~s/\.\.//g; + +$localpath=$slice_dir.$localpath; + +unless (-d $localpath) { + die("Localpath does not exist, please create it first."); +} + +my $hostexpr="(?=^.{1,254}$)(^(?:(?!\d+\.|-)[a-zA-Z0-9_\-]{1,63}(?$already_mounted_testfile"; + print FIL "$remotepath $localpath"; + close FIL; +}