26 lines
890 B
Bash
Executable file
26 lines
890 B
Bash
Executable file
#!/bin/bash
|
|
# Connects remote nfs filesystems
|
|
if [ $# -eq 2 ]; then
|
|
echo "Mounting $1"
|
|
sudo mount -t nfs -o soft,intr 10.8.0.1:/mnt/$1 /mnt/nfs/$1
|
|
echo "Mounting $2"
|
|
sudo mount -t nfs -o soft,intr 10.8.0.1:/mnt/$2 /mnt/nfs/$2
|
|
elif [ $# -gt 2 ]; then
|
|
echo "Mounting $1"
|
|
sudo mount -t nfs -o soft,intr 10.8.0.1:/mnt/$1 /mnt/nfs/$1
|
|
echo "Mounting $2"
|
|
sudo mount -t nfs -o soft,intr 10.8.0.1:/mnt/$2 /mnt/nfs/$2
|
|
echo "Mounting $3"
|
|
sudo mount -t nfs -o soft,intr 10.8.0.1:/mnt/$3 /mnt/nfs/$3
|
|
elif [ $# -eq 1 ]; then
|
|
echo "Mounting $1"
|
|
sudo mount -t nfs -o soft,intr 10.8.0.1:/mnt/$1 /mnt/nfs/$1
|
|
fi
|
|
|
|
if [ $# -eq 0 ]; then
|
|
sudo mount -t nfs -o soft,intr 10.8.0.1:/mnt/Music /mnt/nfs/Music
|
|
sudo mount -t nfs -o soft,intr 10.8.0.1:/mnt/Downloads /mnt/nfs/Downloads
|
|
sudo mount -t nfs -o soft,intr 10.8.0.1:/mnt/Video /mnt/nfs/Video
|
|
echo "Mounted Music, Downloads and Video"
|
|
fi
|
|
exit 0
|