[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] network-bridge script reworked
On Thu, Oct 20, 2005 at 08:22:20PM +0200, Kurt Garloff wrote: > Hi Ewan, > > On Thu, Oct 20, 2005 at 11:41:00AM +0100, Ewan Mellor wrote: > > Kurt, this line > > > > eval `/sbin/getcfg -d /etc/sysconfig/network/ -f ifcfg- -- ${netdev}` > > > > looks a bit SuSE-specific to me. > > Right, I should have removed that hunk or at least do something like > test -e /etc/SuSE-release && eval `...` Is this a reasonable solution: if [ -e /etc/SuSE-release ] then ifup() { eval `/sbin/getcfg -d /etc/sysconfig/network/ -f ifcfg- -- $1` /sbin/ifup ${HWD_CONFIG_0} $1 } ifdown() { eval `/sbin/getcfg -d /etc/sysconfig/network/ -f ifcfg- -- $1` /sbin/ifdown ${HWD_CONFIG_0} $1 } In other words, override ifup and ifdown to do the right thing on SuSE. That way, in our scripts we can just write "ifup eth0". We already are doing this for Gentoo, so this would be my preferred solution, as it keeps all the distro-specific stuff out of the script bodies. My only doubt is that you use the eval before ifup and ifdown in op_start(), but not in op_stop(), and I wonder whether that is important. Ewan. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |