# simple to integer function
function toint() {
- echo "$1" | tr -d [:alpha:]
+ echo "$1" | tr -d '[:alpha:]'
}
#
singlerun=$2
processnow=1
else
- echo "--run option must be fallowed by a backupninja action file"
- fatal "--run option must be fallowed by a backupninja action file"
+ echo "--run option must be followed by a backupninja action file"
+ fatal "--run option must be followed by a backupninja action file"
usage
fi
shift
getconf SLAPCAT /usr/sbin/slapcat
getconf LDAPSEARCH /usr/bin/ldapsearch
getconf RDIFFBACKUP /usr/bin/rdiff-backup
-getconf CSTREAM=/usr/bin/cstream
+getconf CSTREAM /usr/bin/cstream
getconf MYSQLADMIN /usr/bin/mysqladmin
getconf MYSQL /usr/bin/mysql
getconf MYSQLHOTCOPY /usr/bin/mysqlhotcopy
for i in $(ls "$configdirectory"); do
backuploc=$(grep ^directory "$configdirectory"/"$i" | @AWK@ '{print $3}')
if [ "$backuploc" != "$previous" ]; then
- mountdev=$(mount | grep "$backuploc" | @AWK@ '{print $1}')
- df -h "$mountdev"
+ df -h "$backuploc"
previous="$backuploc"
- fi
+ fi
done
fi
} | mail -s "backupninja: $hostname $subject" $reportemail