From 8ccb11fd4ed586c463509b2b458aff6652212bed Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Tue, 16 Feb 2010 17:50:11 +0000 Subject: [PATCH] re-run exportfs in nfsroot if not exported --- lib/PXElator/config.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/PXElator/config.pm b/lib/PXElator/config.pm index 5b84f8c..21b1b4e 100644 --- a/lib/PXElator/config.pm +++ b/lib/PXElator/config.pm @@ -185,6 +185,11 @@ sub nfsroot { } + my $exported = `exportfs | grep $export`; + if ( $exported ne $export ) { + warn "exportfs $exported\n"; + system "sudo exportfs -i -o rw,async,no_root_squash,no_subtree_check,fsid=999 $ip:$export"; + } my $hostname = client::conf( $ip => 'hostname' ) || 'nfsroot'; file::replace "$export/etc/hostname", $hostname; -- 2.20.1