Created
February 23, 2017 16:15
-
-
Save truekonrads/61103901f740d8ade004fedc161a1cc7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| showmount -e $1|perl -wne 'chomp; $root=$1 if m!Export list for ([^:]+):!; if (defined($root) and m!^(/.+?)\s+(\*|\([^)]+\))$!){ $dir="/mnt/nfs/$root/$1"; print "mkdir -p \"$dir\"\n";print "mount -o vers=3,nolock \"$root:$1\" \"$dir\"\n";}'|sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment