#!/bin/bash # script for wizard firewall configuration # # return on stdout the list of allowed devices for external network interface # this script should be improved pdevice=`. ./common/scripts/functions.sh; ./firewall_wizard/scripts/compute_ext_device.sh` liste="ppp0\nppp0\nppp1\nppp1\nisdn0\nisdn0\nisdn1\nisdn1\n" liste=$liste"`ifconfig -a | awk ' /^eth/ { print $1"\n"$1, $4,":",$5 } '`\n" #for i in 0 1 2 3 ;do # liste=${liste}"eth$i\nethernet adapter \ # `ifconfig -a | grep eth$i| sed -n -e '1{s/.*HWaddr \(.*\)$/\1/p;}'`\n" # liste=${liste}"eth$i\neth$i \ # `dmesg | grep eth$i| sed -n -e '1{s/^[^:]*: *\(.*\)$/\1/p;}'`\n" #done test=`echo "${liste}" | grep ${pdevice}` [ -z "${test}" ] && liste="${pdevice}\n"${liste} echo -ne "${liste}" exit 0