From eadd953d72897302c90f17d371453132e8584441 Mon Sep 17 00:00:00 2001 From: hackbard Date: Tue, 6 Sep 2005 14:15:01 +0000 Subject: [PATCH] hostname argv[1] --- fai_backup.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fai_backup.sh b/fai_backup.sh index 110d871..95d4327 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" -- 2.20.1