Commit 72f37159 authored by Paul Formosa's avatar Paul Formosa
Browse files

Add nfsmount handler

parent f25b0d22
......@@ -27,6 +27,7 @@ Depends:
rdiff-backup,
sshfs,
unzip,
nfs-common,
nsca
Suggests:
bzip2,
......@@ -38,6 +39,7 @@ Suggests:
rdiff-backup,
rsync,
subversion,
nfs-common,
trickle,
wodim
Description: lightweight, extensible meta-backup system
......
......@@ -10,3 +10,5 @@ examples/example.svn
examples/example.sys
examples/example.trac
examples/backupninja.conf
examples/example.smbmount
examples/example.nfsmount
## name of the share you want to mount
nfsmountpath = /volume1/backups
## name or IP address of the server that shares the directory
host = <hostname or ipaddress>
## where to mount it
mountpoint = /mnt/foldername
## name of the share you want to mount
share = sharedfolder
## name or IP address of the server that shares the directory
host = <hostname or ipaddress>
## name of the user to connect as
## (defaults to "guest")
user = username
## password for this user if required (otherwise don't specify)
pass = password
## where to mount it
mountpoint = /mnt/mountpointfolder
\ No newline at end of file
#!/bin/sh
# Mount a remote NFS share ('nfsmountpath') from a NFS server ('host')
# onto a destination directory ('mountpoint').
### ATTENTION
# This handler assumes that nfs-common packages are installed on the system
getconf nfsmountpath
getconf host
getconf mountpoint
if [ ! -d "$mountpoint" ]; then
halt "Destination directory does not exist"
fi
if grep $mountpoint /proc/mounts; then
umount -f $mountpoint
fi
mount $host:$nfsmountpath $mountpoint || halt "Mount failed"
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment