controllo configurazione

Federico fast6@lists.bofh.it
Wed Oct 2 18:20:06 2002


On Wed, 2 Oct 2002 18:07:03 +0200 (CEST)
Antonio Laterza <anlater2001@yahoo.it> wrote:
> Ciao Marco, il problema č che lo script che hai postato non lo vedo
> come attach, proverņ + tardi a passarlo a uudecode o qualcosa del
> genere...
Io con sylpheed lo leggo subito.. strano che tu nn ci riesca. Te lo
ripasto qui, fai un copa e incolla in un file nuovo, lo rendi exeguibile
e via :)

===BEGIN===
#!/bin/bash
# vim: sw=2

PATH="$PATH:/usr/local/sbin:/sbin:/usr/sbin"

SSH=$(which ssh)
PPPD=$(which pppd)
IPROUTE=$(which ip)

if [ "$UID" != 0 ]; then
  echo "ERROR: you must run this script as root."
  exit 1
fi

if [ ! "$SSH" ]; then
  echo "ERROR: ssh is not in the PATH ($PATH)"
fi

if [ "$PPPD" ]; then
  if ! grep -q ipv6cp-use-ipaddr $PPPD; then
    echo "ERROR: $PPPD does not support IPv6."
  fi
else
  echo "ERROR: pppd is not in the PATH ($PATH)"
fi

if [ "$IPROUTE" ]; then
  if ! $IPROUTE route show > /dev/null 2>&1; then
    echo "ERROR: $IPROUTE failed. missing CONFIG_NETLINK support?"
  fi
  if ! $IPROUTE tunnel add test-$$ mode sit > /dev/null 2>&1; then
    echo "ERROR: $IPROUTE failed. missing CONFIG_NET_IPIP support?"
  fi
else
  echo "ERROR: iproute is not in the PATH ($PATH)"
fi

if [ ! -d /proc/sys/net/ipv6 ]; then
  echo "ERROR: missing CONFIG_IPV6 support."
fi

exit 0
====END====

-- 
Federico
Programmo per www.sideralis.net
Uso gentoo linux www.gentoo.org
Sono registrato come utente linux http://counter.li.org #277268
E odio il codice HTML nelle mail, ricordalo...