updating baselayout, emerge will only replace /etc/init.d/net.eth0 : if you have more than a ethernet interface the older scripts net.ethX (with 1<=X<=N) won't get updated causing ethernet interface ifup to fail at boot. ebuild file should copy net.eth0 to net.ethX during install. probably the same happens for ppp0, but i dom't know since i do not have more than one ppp interface. tested with baselayout-1.8.4.2
This is hardly necessary. Since net.eth0, net.eth1, ... don't differ from each other, you may safely have symlinks pointing to net.eth0. /etc/init.d/net.eth0 /etc/init.d/net.eth1 -> net.eth0 /etc/init.d/net.eth2 -> net.eth0 This way, there is no need for some special way of handling net.ethX.
i tested using symlinks to net.eth0 but it seems to me to cause some problems at next reboot when baselayout package gets updated (this is what happed to me...removing the links solved the problem). i still think modifying the ebuild file to take care of net.ethX would be the best solution...
I suggest to add the following (or something like this...) to the ebuild script, in the pkg_postinstall section: eth="`ls /etc/init.d/net.eth*`" for _g in $_eth; do _t="`echo $_g | cut -c 20-`" if [ $_t != "0" ]; then rm /etc/init.d/net.eth${_t} cp /etc/init.d/net.eth0 /etc/init.d/net.eth{_t} fi done ppp="`ls /etc/init.d/net.ppp*`" for _g in $_ppp; do _t="`echo $_g | cut -c 20-`" if [ $_t != "0" ]; then rm /etc/init.d/net.ppp${_t} cp /etc/init.d/net.ppp0 /etc/init.d/net.ppp{_t} fi done bye, Alessandro
I tried using symlinks, but the first thing runscript.sh does is running readlink and basing $IFACE on that, making it try to bring up eth0. I guess this is necessary for reading config files for linked scripts, but in this case it's annoying. Runscript.sh should only use readlink if $0 is not in /etc/init.d, and it should actually keep running readlink until it gets something in /etc/init.d or until it is no longer a symlink. So please fix runscript.sh so that we can symlink and this bug is fixed :) An alternative would be to have support for arguments for the initscripts, then we would just run /etc/init.d/net iface=eth1 start. But that would be difficult for all the other scripts, I guess.
I did ask somebody some time ago (who also biatched :P) to test it without the readlink, and come back to me. Unfortunately he (and who he was) vanished ;) Try it, let me know its fine, and we can fix it.
any work on this?
martin said to modify your runscipt.sh files to not use readlink if the file is in /etc/init.d and tell him how it works out in other words, if you want to see progress, give him some feedback ;)
martin: what I need to change in runscript.sh to test your solution? let me know: i'm available for testing it out. alessandro
*** Bug 29730 has been marked as a duplicate of this bug. ***
I don't see this as a bug but as a feature ... it saved my bacon with bug # 33272 having an old version of net.eth1 arround allowed me to re-establish connectivity .. by copying it over the newer faulty net.eth0 .. derk
Okay, two issues in this bug: 1. When updating, baselayout doesn't copy net.eth0 to net.ethX. This isn't going to happen... you should just use symlinks as was mentioned by a few people. If you're paranoid that net.eth0 will break, then you should keep some binary packages of baselayout around or cook up some other solution. 2. When net.eth1 is a symlink to net.eth0, then it would resolve the link and attempt to start/stop eth0. This was fixed 9 months, 2 weeks ago by azarah in revision 1.24 of rc-scripts So this bug is resolved...