X-Git-Url: https://hackdaworld.org/gitweb/?p=scripts%2Fscripts.git;a=blobdiff_plain;f=fai_backup.sh;h=d2ddb388dad57b951fb3a8159acbf7e64c4aa138;hp=110d8717000ae8b9251535f6fe068168db5d0fe5;hb=HEAD;hpb=d8baf2f1d4f9d7abd0a2990c2819f070275cfcc1 diff --git a/fai_backup.sh b/fai_backup.sh index 110d871..d2ddb38 100755 --- a/fai_backup.sh +++ b/fai_backup.sh @@ -30,7 +30,11 @@ backupdir="/mnt/tmp2" # initializing custom variables host=`hostname` -myip="`host $host | awk '{ print $4 }'`" +if [ -z $1 ] ; then + myip="`host $host | awk '{ print $4 }'`" +else + myip=$1 +fi res=$? if [ "$res" != "0" ] ; then echo "unable to determine the hosts ip address" @@ -82,7 +86,8 @@ done for i in dhcpd.conf fstab hosts host.conf hosts.allow hosts.deny lilo.conf \ profile sendmail.cf resolv.conf exports fb.modes inetd.conf \ xinetd.conf mp3user mp3db.conf modules.conf named.conf \ - modprobe.devfs modprobe.conf crontab ethers HOSTNAME; do + modprobe.devfs modprobe.conf crontab ethers HOSTNAME \ + lircd.conf; do [ -f /etc/$i ] && configcp /etc/$i done for configfile in /var/named/*; do