From 950571c5a0e5cf3492a2b1f51637112f27afd754 Mon Sep 17 00:00:00 2001 From: Sapan Bhatia Date: Thu, 19 Mar 2009 18:54:01 +0000 Subject: [PATCH] Trying to repair dfferences b/w the merge --- nfsmount | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100755 nfsmount 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; +} -- 2.43.0