re-run exportfs in nfsroot if not exported
authorDobrica Pavlinusic <dpavlin@rot13.org>
Tue, 16 Feb 2010 17:50:11 +0000 (17:50 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Tue, 16 Feb 2010 17:50:11 +0000 (17:50 +0000)
lib/PXElator/config.pm

index 5b84f8c..21b1b4e 100644 (file)
@@ -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;