Skip to content

Instantly share code, notes, and snippets.

@shalk
Last active December 31, 2015 17:09
Show Gist options
  • Save shalk/8018597 to your computer and use it in GitHub Desktop.
Save shalk/8018597 to your computer and use it in GitHub Desktop.
nfs client
#!/bin/bash
usage(){
echo "$0 ip
egg $0 10.0.50.171
"
exit 1
}
if [[ $# != 1 ]]
then
usage
fi
ip=$1
echo 123
mount -t nfs -o rw,tcp,soft,rsize=8192,wsize=8192,timeo=100,intr,retry=1,noatime $ip:/dsx01 /dsx01
echo 124
if grep $ip /etc/init.d/after.local > /dev/null
then
echo
else
echo "mount -t nfs -o rw,tcp,soft,rsize=8192,wsize=8192,timeo=100,intr,retry=1,noatime $ip:/dsx01 /dsx01" >> /etc/init.d/after.local
fi
uniq /etc/init.d/after.local > /tmp/after.local
cp -rf /tmp/after.local /etc/init.d/after.local
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment