paul- wrote:
> The version of iproute2 is the same. It fails from the piCore repo,
> because the kernel modules needed are not on that repo. Put your
> bonding commands after the pCp startup
>
> In /opt/bootlocal.sh
>
> Make sure you put it after the marker tags in the file. Then do a "pcp
> bu" to backup your settings
Thank you.
This is what I have now in bootlocal.sh:
Code:
--------------------
tc@berlin-boombox:~$ cat /opt/bootlocal.sh
#!/bin/sh
# put other system startup commands here
GREEN="$(echo -e '\033[1;32m')"
echo
echo "${GREEN}Running bootlocal.sh..."
#pCPstart------
/home/tc/www/cgi-bin/do_rebootstuff.sh 2>&1 | tee -a /var/log/pcp_boot.log
#pCPstop------
echo
echo "Setup eth0+wlan0 link aggregate, eth0 primary..."
modprobe bonding mode=1 primary=eth0 fail_over_mac=1 max_bonds=1 miimon=250
ifconfig bond0 up
ifconfig eth0 down
ifconfig wlan0 down
echo +eth0 > /sys/class/net/bond0/bonding/slaves
echo +wlan0 > /sys/class/net/bond0/bonding/slaves
echo "Get lease for interface bond0"
for PID in $(pidof udhcpc);do kill -USR2 $PID; done
for PID in $(pidof udhcpc);do kill $PID; done
sleep 5
udhcpc -b -i bond0 -x hostname berlin-boombox -p /var/run/udhcpc.bond0.pid
--------------------
I came to the realisation I wasn't using the "ip" command so extension
iproute2.tcz is not needed.
I'm not sure the sleep 5 (or 2 kill loops instead of one) are needed but
I have had some temporary loss of contact after reboot without them. I
supposed the lease for bond0 was asked a bit too early for any slave to
have become active (I tested with wifi, secondary + needs to
authenticate). Sleep 5 seems to fix that anyway.
The web interface about wifi says reboot is recommended because the wifi
interface has no address, which is true...
Of course with fail_over_mac=active the MAC of the bond changes
according to the active slave, so my dnsmasq entry for this host reads
like this:
Code:
--------------------
dhcp-host=b8:27:eb:01:20:33,74:da:38:10:11:01,berlin-boombox,172.17.200.10,2h
--------------------
This format serves the same hostname and IP address to 2 different MACs,
so bond0 will keep the same address when it renews its lease whichever
slave is active at the time.
3 SB 3 Libratone Loop, Zipp Mini iPeng (iPhone + iPad) LMS 7.9
(linux) with plugins: CD Player, WaveInput, Triode's BBC iPlayer by bpa
IRBlaster by Gwendesign (Felix) Server Power Control by Gordon
Harris Smart Mix, Music Walk With Me, What Was That Tune? by Michael
Herger PowerSave by Jason Holtzapple Song Info, Song Lyrics by
Erland Isaksson AirPlay Bridge by philippe_44 WeatherTime by Martin
Rehfeld Auto Dim Display, SaverSwitcher, ContextMenu by Peter Watkins.
------------------------------------------------------------------------
epoch1970's Profile: http://forums.slimdevices.com/member.php?userid=16711
View this thread: http://forums.slimdevices.com/showthread.php?t=106755
_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/unix