]> git.sur5r.net Git - bacula/bacula/commitdiff
Do dirty check on hostname (Linux only) and if not resolvable
authorKern Sibbald <kern@sibbald.com>
Sun, 5 Oct 2008 10:42:47 +0000 (10:42 +0000)
committerKern Sibbald <kern@sibbald.com>
Sun, 5 Oct 2008 10:42:47 +0000 (10:42 +0000)
     use localhost as default.

git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@7707 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/autoconf/configure.in
bacula/configure
bacula/technotes-2.5

index 81527a19f9d1fc387bc52af71be49027c0d67b54..20a91da9725f6ed056ae9c359353a7814c324566 100644 (file)
@@ -2048,6 +2048,11 @@ darwin)
           platforms/darwin/Makefile"
   ;;
 debian)
+#      Make sure hostname is resolved
+       ping -c 1 $hostname 2>&1 1>/dev/null
+       if test ! $? = 0; then
+          hostname="localhost"
+       }
        if `grep -q ubuntu /etc/apt/sources.list`; then
           DISTNAME="ubuntu"
        fi
@@ -2081,6 +2086,14 @@ debian)
        fi
   ;;
 freebsd)
+#      Make sure hostname is resolved
+       ping -c 1 $hostname 2>&1 1>/dev/null
+       if test ! $? = 0; then
+          hostname="localhost"
+       }
+       if `grep -q ubuntu /etc/apt/sources.list`; then
+          DISTNAME="ubuntu"
+       fi
        DISTVER=`uname -a |awk '{print $3}'`
        VER=`echo $DISTVER | cut -c 1`
        if test x$VER = x4 ; then
@@ -2140,6 +2153,14 @@ openbsd)
            platforms/openbsd/bacula-dir"
   ;;
 redhat)
+#      Make sure hostname is resolved
+       ping -c 1 $hostname 2>&1 1>/dev/null
+       if test ! $? = 0; then
+          hostname="localhost"
+       }
+       if `grep -q ubuntu /etc/apt/sources.list`; then
+          DISTNAME="ubuntu"
+       fi
        if test -f /etc/whitebox-release ; then
           f=/etc/whitebox-release
        else
@@ -2164,6 +2185,14 @@ redhat)
            "
   ;;
 mandrake)
+#      Make sure hostname is resolved
+       ping -c 1 $hostname 2>&1 1>/dev/null
+       if test ! $? = 0; then
+          hostname="localhost"
+       }
+       if `grep -q ubuntu /etc/apt/sources.list`; then
+          DISTNAME="ubuntu"
+       fi
        DISTVER=`cat /etc/mandrake-release | grep release |\
           cut -f 5 -d ' '`
        TAPEDRIVE="/dev/nst0"
@@ -2177,6 +2206,14 @@ mandrake)
            "
   ;;
 gentoo)
+#      Make sure hostname is resolved
+       ping -c 1 $hostname 2>&1 1>/dev/null
+       if test ! $? = 0; then
+          hostname="localhost"
+       }
+       if `grep -q ubuntu /etc/apt/sources.list`; then
+          DISTNAME="ubuntu"
+       fi
        DISTVER=`awk '/version / {print $5}' < /etc/gentoo-release`
        TAPEDRIVE="/dev/nst0"
        PSCMD="ps -e -o pid,command"
@@ -2188,6 +2225,14 @@ gentoo)
            platforms/gentoo/bacula-dir"
   ;;
 slackware)
+#      Make sure hostname is resolved
+       ping -c 1 $hostname 2>&1 1>/dev/null
+       if test ! $? = 0; then
+          hostname="localhost"
+       }
+       if `grep -q ubuntu /etc/apt/sources.list`; then
+          DISTNAME="ubuntu"
+       fi
        DISTVER=`cat /etc/slackware-version`
        TAPEDRIVE="/dev/nst0"
        PSCMD="ps -e -o pid,command"
@@ -2213,6 +2258,14 @@ solaris)
        LIBS="$LIBS -lresolv"
   ;;
 suse)
+#      Make sure hostname is resolved
+       ping -c 1 $hostname 2>&1 1>/dev/null
+       if test ! $? = 0; then
+          hostname="localhost"
+       }
+       if `grep -q ubuntu /etc/apt/sources.list`; then
+          DISTNAME="ubuntu"
+       fi
        DISTVER=`cat /etc/SuSE-release |grep VERSION|\
            cut -f 3 -d ' '`
        TAPEDRIVE="/dev/nst0"
@@ -2226,6 +2279,14 @@ suse)
            platforms/suse/bacula.spec"
   ;;
 suse5)
+#      Make sure hostname is resolved
+       ping -c 1 $hostname 2>&1 1>/dev/null
+       if test ! $? = 0; then
+          hostname="localhost"
+       }
+       if `grep -q ubuntu /etc/apt/sources.list`; then
+          DISTNAME="ubuntu"
+       fi
        DISTNAME=suse
        DISTVER=5.x
        TAPEDRIVE="/dev/nst0"
index 0b48a6c0e61a1003c436b03c3a74a81c2f878d88..17a2078f6acd705c2d7416e7624f617675ac295d 100755 (executable)
@@ -34602,6 +34602,11 @@ darwin)
           platforms/darwin/Makefile"
   ;;
 debian)
+#      Make sure hostname is resolved
+       ping -c 1 $hostname 2>&1 1>/dev/null
+       if test ! $? = 0; then
+          hostname="localhost"
+       }
        if `grep -q ubuntu /etc/apt/sources.list`; then
           DISTNAME="ubuntu"
        fi
@@ -34635,6 +34640,14 @@ debian)
        fi
   ;;
 freebsd)
+#      Make sure hostname is resolved
+       ping -c 1 $hostname 2>&1 1>/dev/null
+       if test ! $? = 0; then
+          hostname="localhost"
+       }
+       if `grep -q ubuntu /etc/apt/sources.list`; then
+          DISTNAME="ubuntu"
+       fi
        DISTVER=`uname -a |awk '{print $3}'`
        VER=`echo $DISTVER | cut -c 1`
        if test x$VER = x4 ; then
@@ -34697,6 +34710,14 @@ openbsd)
            platforms/openbsd/bacula-dir"
   ;;
 redhat)
+#      Make sure hostname is resolved
+       ping -c 1 $hostname 2>&1 1>/dev/null
+       if test ! $? = 0; then
+          hostname="localhost"
+       }
+       if `grep -q ubuntu /etc/apt/sources.list`; then
+          DISTNAME="ubuntu"
+       fi
        if test -f /etc/whitebox-release ; then
           f=/etc/whitebox-release
        else
@@ -34721,6 +34742,14 @@ redhat)
            "
   ;;
 mandrake)
+#      Make sure hostname is resolved
+       ping -c 1 $hostname 2>&1 1>/dev/null
+       if test ! $? = 0; then
+          hostname="localhost"
+       }
+       if `grep -q ubuntu /etc/apt/sources.list`; then
+          DISTNAME="ubuntu"
+       fi
        DISTVER=`cat /etc/mandrake-release | grep release |\
           cut -f 5 -d ' '`
        TAPEDRIVE="/dev/nst0"
@@ -34734,6 +34763,14 @@ mandrake)
            "
   ;;
 gentoo)
+#      Make sure hostname is resolved
+       ping -c 1 $hostname 2>&1 1>/dev/null
+       if test ! $? = 0; then
+          hostname="localhost"
+       }
+       if `grep -q ubuntu /etc/apt/sources.list`; then
+          DISTNAME="ubuntu"
+       fi
        DISTVER=`awk '/version / {print $5}' < /etc/gentoo-release`
        TAPEDRIVE="/dev/nst0"
        PSCMD="ps -e -o pid,command"
@@ -34745,6 +34782,14 @@ gentoo)
            platforms/gentoo/bacula-dir"
   ;;
 slackware)
+#      Make sure hostname is resolved
+       ping -c 1 $hostname 2>&1 1>/dev/null
+       if test ! $? = 0; then
+          hostname="localhost"
+       }
+       if `grep -q ubuntu /etc/apt/sources.list`; then
+          DISTNAME="ubuntu"
+       fi
        DISTVER=`cat /etc/slackware-version`
        TAPEDRIVE="/dev/nst0"
        PSCMD="ps -e -o pid,command"
@@ -34773,6 +34818,14 @@ _ACEOF
        LIBS="$LIBS -lresolv"
   ;;
 suse)
+#      Make sure hostname is resolved
+       ping -c 1 $hostname 2>&1 1>/dev/null
+       if test ! $? = 0; then
+          hostname="localhost"
+       }
+       if `grep -q ubuntu /etc/apt/sources.list`; then
+          DISTNAME="ubuntu"
+       fi
        DISTVER=`cat /etc/SuSE-release |grep VERSION|\
            cut -f 3 -d ' '`
        TAPEDRIVE="/dev/nst0"
@@ -34786,6 +34839,14 @@ suse)
            platforms/suse/bacula.spec"
   ;;
 suse5)
+#      Make sure hostname is resolved
+       ping -c 1 $hostname 2>&1 1>/dev/null
+       if test ! $? = 0; then
+          hostname="localhost"
+       }
+       if `grep -q ubuntu /etc/apt/sources.list`; then
+          DISTNAME="ubuntu"
+       fi
        DISTNAME=suse
        DISTVER=5.x
        TAPEDRIVE="/dev/nst0"
index 854f5a27827f5cd9cfabf95ced3c69b8f4e1b304..ffd2e840deffaa08a66b32fd89429389938ac0fd 100644 (file)
@@ -18,6 +18,8 @@ remove reader/writer in FOPTS????
 
 General:
 05Oct08
+kes  Do dirty check on hostname (Linux only) and if not resolvable
+     use localhost as default.
 kes  Increase vtape max block to 20GB.
 04Oct08
 kes  Refactor restore code to create a close_previous_stream(). This