[etherlab-users] ./configure error
Mike O'Connor
mike at oeg.com.au
Thu Oct 30 10:32:22 CET 2014
On 30/10/2014 7:40 pm, wuybit wrote:
> Hi Jun,
> Thank you for your help
> After do $ apt-get install linux-headers-2.6.32-5-686, it's OK.
>
> But when I do 'cp etc/sysconfig/ethercat /etc/sysconfig/',
> it comes out that "cp: cannot creat creat rugular file '
> /etc/sysconfig/ethercat': no such file file or directory. I also see
> directory /etc/, there is no sysconfig (Debian 6.04)
> How should I do? Should I make a folder named sysconfig, then do copy
> or else?
>
> Also, executing 'insserv ethercat' command wasn't OK.
>
> I almost do not have linux foundation knowledge.
>
>
Hi
I use the script below and run it from /etc/rc.local on debian systems
#!/bin/sh
# ethercat control
if [ "$2" = "" ]; then
IF=eth1
else
IF=$2
fi
MAC=`ifconfig $IF |grep -E -o '([0-9a-fA-F]{2}:){5}[0-9a-fA-F]{2}'`
echo "using interface $IF, hwaddr $MAC"
if [ "$1" = "stop" ]; then
ifconfig $IF down
rmmod ec_generic
rmmod ec_master
modprobe e1000e InterruptThrottleRate=0
elif [ "$1" = "start" ]; then
modprobe ec_master main_devices=$MAC
modprobe ec_generic
ifconfig $IF up
ethtool -C $IF rx-usecs 0 rx-frames 1 tx-usecs 0 tx-frames 1
[ -e /dev/EtherCAT0 ] && chmod go+rw /dev/EtherCAT0
fi
Cheers
Mike
More information about the Etherlab-users
mailing list