Koozali.org: home of the SME Server
Obsolete Releases => SME Server 7.x => Topic started by: micor on May 23, 2008, 02:32:50 PM
-
Hi.
I want to set the MACADDR on the external interface because my ISP is... well you know what I mean...
I really would like to follow the recommendations found in the developer documentation at
http://wiki.contribs.org/SME_Server:Documentation:Developers_Manual#Local_site_overrides:_templates-custom_and_templates-user-custom
This is what I've done so far...
I put a 45MACADDR file in /etc/e-smith/templates-custom/etc/sysconfig/network-scripts/ifcfg-ethX/
which contains:
{
if ($is_external)
{
return "MACADDR=xx:xx:xx:xx:xx:xx"
}
}
I tried to do some event-signalling, but I'm not really sure how it all works. I may need a nudge in the right direction on that one...
My LAN if is eth0 and wan if is eth1.
the MACADDR line with my specified MAC shows up in /etc/sysconfig/network-scripts/ifcfg-eth1
but it is not doing anything at system startup...
i.e. ifconfig eth1 shows the "wrong" / original MAC.
If I do ifdown eth1;ifup eth1 ifconfig eth1 shows the "correct" / specified MAC...
What am I missing?
Update:
I figured out a workaround, but I would like to know if it's clean from a SME perspective.
I added a 30ONBOOT to the custom template dir with the code logic as 45MACADDR except for the ONBOOT=yes
and now it works. However I'm not convinced it's a "proper" solution to the problem