]> hackdaworld.org Git - scripts/scripts.git/commitdiff
hostname argv[1]
authorhackbard <hackbard>
Tue, 6 Sep 2005 14:15:01 +0000 (14:15 +0000)
committerhackbard <hackbard>
Tue, 6 Sep 2005 14:15:01 +0000 (14:15 +0000)
fai_backup.sh

index 110d8717000ae8b9251535f6fe068168db5d0fe5..95d4327ec08161debc1c42a1d6ab5ec487fdcc83 100755 (executable)
@@ -30,7 +30,11 @@ backupdir="/mnt/tmp2"
 
 # initializing custom variables
 host=`hostname`
 
 # 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"
 res=$?
 if [ "$res" != "0" ] ; then
        echo "unable to determine the hosts ip address"