|
Written by Bart Dorlandt
|
|
Friday, 29 June 2007 11:34 |
|
I use this script with the IF statements because I use subversion to
keep control of my scripts and use different machines which do the same
tasks.
NFS
#!/bin/bash
method1() {
mount -t nfs -o rsize=8192,wsize=8192,retry=1 <server_IP or DNS>:/data /mnt/nfs
}
method2() {
mount_nfs -R1 <server_IP or DNS>:/data /mnt/kamer
}
MACHINE=`uname`
if [ "$MACHINE" = "Linux" ]; then
method1
else
if [ "$MACHINE" = "FreeBSD" ]; then
method2
fi
fi
Samba
method1() {
mount -t cifs //<servername>/data /mnt/samba -o user=<remote_username>,uid=<local_username>
}
method2() {
mount_smbfs -W <work_group> -u <local_username> //<remote_username>@<servername>/data /mnt/samba/
}
MACHINE=`uname`
if [ "$MACHINE" = "Linux" ]; then
method1
else
if [ "$MACHINE" = "FreeBSD" ]; then
method2
fi
fi
|
|
Last Updated on Tuesday, 17 July 2007 14:34 |