#!/bin/bash #nmap --send-eth -oG -PE -n -p21 192.168.178.1 102.168.2.1 echo "-------------------------------------------------------------------------------------------------------" echo "--WARNING: This script will clear environment variables on older Speedports without EVA Bootloader!!--" echo "If this is the case you need to add some individual variables into this skript at the marked position." echo "------------------- Make sure only one netcard is installed in your PC! ---------------------------" echo "---------------------------------------- 192.168.2.1 -------------------------------------------------" echo "--------------------------------------- BRANDING: tcom -----------------------------------------------" . incl_var ETHLIST=" eth0 eth1 eth2 eth3" if [ $ETH_IF ]; then ETHLIST="$ETH_IF" echo "Net cards set up for search active netconnections: $ETHLIST" else echo "Net cards set up for search active netconnections: $ETHLIST" echo "This list was set default, but can be set in advance." fi for ETH in ${ETHLIST} ; do if ifconfig $ETH > /dev/null ; then echo "Ethernet card found on: $ETH" break fi done ifconfig $ETH add 192.168.178.10 PTEST=" finalize=1 subnet=2.10" touch empty for i in ${PTEST} ; do case $i in subnet=*) PTEST_SERVER=192.168.${i##subnet=} export PTEST_SERVER echo "PTEST_SERVER=$PTEST_SERVER" esac done echo "You should now reboot your box. Waiting for box to shut down for restart ..." while [ `ping -c1 -w1 192.168.2.1 | grep 'receive' | awk '{ print $4 }'` == "1" ]; do echo -n "." sleep 1 done while [ `ping -c1 -w1 192.168.2.1 2>&1 | grep -c 'Unreachable'` != "0" ] ||\ [ `ping -c1 -w1 192.168.2.1 | grep 'receive' | awk '{ print $4 }'` == "0" ]; do done echo "." echo "Reset Environment..." ftp -n -p <&1 | grep -c 'Unreachable'` != "0" ] ||\ [ `ping -c1 -w1 192.168.2.1 | grep 'receive' | awk '{ print $4 }'` == "0" ]; do done echo "." echo "Box is back up again..." ftp -n -p <