编辑/etc/firestarter/firestarter.sh
根据本机ifconfig的输出信息来修改以下几行
根据本机ifconfig的输出信息来修改以下几行
代码
:
IP=`/sbin/ifconfig $IF | grep inet | cut -d : -f 2 | cut -d / -f 1`
MASK=`/sbin/ifconfig $IF | grep Mas | cut -d : -f 4`
BCAST=`/sbin/ifconfig $IF |grep Bcast: | cut -d : -f 3 | cut -d / -f 1`
例如,我的系统使用eth0上网,就执行ifconfig eth0。其中IP地址依然可以通过以上代码的第一行获取,只是子网掩码和广播地址的获取会有问题。于是保留第一行不做修改,将后两行代码中grep搜索的英文字符串改为相应中文字符串即可。
IP=`/sbin/ifconfig $IF | grep inet | cut -d : -f 2 | cut -d / -f 1`
MASK=`/sbin/ifconfig $IF | grep 掩码: | cut -d : -f 4`
BCAST=`/sbin/ifconfig $IF |grep 广播: | cut -d : -f 3 | cut -d / -f 1`
保存文件后,启动Firestarter。一切正常。
不知道别人遇到的问题是否和我的一样,记录下来,仅供参考吧。
IP=`/sbin/ifconfig $IF | grep inet | cut -d : -f 2 | cut -d / -f 1`
MASK=`/sbin/ifconfig $IF | grep Mas | cut -d : -f 4`
BCAST=`/sbin/ifconfig $IF |grep Bcast: | cut -d : -f 3 | cut -d / -f 1`
例如,我的系统使用eth0上网,就执行ifconfig eth0。其中IP地址依然可以通过以上代码的第一行获取,只是子网掩码和广播地址的获取会有问题。于是保留第一行不做修改,将后两行代码中grep搜索的英文字符串改为相应中文字符串即可。
IP=`/sbin/ifconfig $IF | grep inet | cut -d : -f 2 | cut -d / -f 1`
MASK=`/sbin/ifconfig $IF | grep 掩码: | cut -d : -f 4`
BCAST=`/sbin/ifconfig $IF |grep 广播: | cut -d : -f 3 | cut -d / -f 1`
保存文件后,启动Firestarter。一切正常。
不知道别人遇到的问题是否和我的一样,记录下来,仅供参考吧。