From: Joe Z. <jz...@us...> - 2010-02-24 23:49:49
|
Update of /cvsroot/bobs/bobs/inc/templates In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv2299/bobs/inc/templates Modified Files: backup_smb.sh Log Message: 2010-02-24 jz Allow a samba mount without a login id and password. Fix Windows Daylight Savings Time bug from flagging all files changed by one hour when DST changes. Use "--modify-window=3601." Index: backup_smb.sh =================================================================== RCS file: /cvsroot/bobs/bobs/inc/templates/backup_smb.sh,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- backup_smb.sh 23 Jan 2005 20:03:18 -0000 1.1 +++ backup_smb.sh 24 Feb 2010 23:49:39 -0000 1.2 @@ -52,8 +52,13 @@ } fi -mount -t smbfs -o username={LOGIN},password={PASSWORD} \ - //{SERVER_NAME_OR_IP}/{SMB_SHARE} {MOUNTDIR} +if [ "{LOGIN}" != "" ]; then + mount -t cifs -o username={LOGIN},password={PASSWORD} \ + //{SERVER_NAME_OR_IP}/{SMB_SHARE} {MOUNTDIR}; +else + mount -t cifs -o password={PASSWORD} \ + //{SERVER_NAME_OR_IP}/{SMB_SHARE} {MOUNTDIR}; +fi RC=$? if [ $RC -ne 0 ]; then @@ -69,6 +74,7 @@ rsync --archive --verbose --delete --backup --compress \ --backup-dir="{INCOMINGDIR}/{SERVER}/{SHARE}/" \ + --modify-window=3601 \ {EXCLUDE_FROM} \ "{MOUNTDIR}/" "{BACKUPDIR}/{SERVER}/{SHARE}/" RC=$? |