Added sourcing of system specific configuration file /etc/lsbackups.conf if it exists.
[backups/.git] / scripts / pack-image.sh
index 327d374b27762d5b741e6456e5fe709dc2f5c26e..9dcc6bf4191a9d16f54452d32b5132ebf36d91b5 100755 (executable)
@@ -4,8 +4,15 @@ scriptsdir=$(dirname $0)
 
 export PATH=$scriptsdir:/bin:/usr/bin:/sbin:/usr/sbin
 
+# source the default configuration
 . config.sh
 
+# source the system specific configuration
+if [ -f /etc/lsbackups.conf ]
+then
+  . /etc/lsbackups.conf
+fi 
+
 # file locations and other values
 today=$(date +%Y%m%d%H%M%S)
 isoimage="$imagedir/$today.img"
@@ -38,7 +45,7 @@ echo "Determining list of files to backup with lsbackups"
 } | lsbackups > $backups 2>$statusfile
 
 echo "Running rsync to pack the image"
-rsyncopts="-l -p -t -g -o -0 --files-from=- --stats --progress"
+rsyncopts="-W -H -S -l -p -t -g -o -0 --files-from=- --stats --progress"
 cat $backups | rsync $rsyncopts / $isomountdir
 
 echo "Copying over database and status file"