Wow, I didn't notice SME-server was that complicated to sysadmin
well, it is simple to sysadmin for its intended use, when you want to tweak it fo a non supported use, it can become a challenge unless you take the time to read the documentation:
https://wiki.contribs.org/Template_TutorialI tried several changes and addings in :
/etc/e-smith/templates/etc/sysconfig/network-scripts/ifcfg-ethX/
you should not modify a template file, or might break your server.
to reverse this please do :
yum reinstall e-smith-base -y
config set UnsavedChanges no
/etc/e-smith/events/actions/update-ifcfg
then to modify a template, create a template-custom as explained here:
https://wiki.contribs.org/Template_Tutorial#Specific_practical_examplesmkdir -p /etc/e-smith/templates-custom/etc/sysconfig/network-scripts/ifcfg-ethX/
then you should create 2 files a with your favorite editor ( mcedit, vi, pico ...)
vim /etc/e-smith/templates-custom/etc/sysconfig/network-scripts/ifcfg-ethX/00setup-moreIntfce
{
$is_private = (exists $PrivateInterface{Name} and
$PrivateInterface{Name} eq $THIS_DEVICE );
if ($is_private || ($is_external && $PrivateInterface{Configuration} eq "static"))
{
$ifup_this_device = "yes";
}
"";
}
vim /etc/e-smith/templates-custom/etc/sysconfig/network-scripts/ifcfg-ethX/90otherparams-moreIntfce
{
if ($is_private)
{
# We are now running a supervised dhcpcd - setting the BOOTPROTO to "none"
# allows the supervised dhcpcd to do the work without fighting with ifup
return "BOOTPROTO=none" if ($PrivateInterface{Configuration} eq "dhcp");
my ($network, $broadcast) = esmith::util::computeNetworkAndBroadcast ($PrivateInterface{IPAddress}, $PrivateInterface{Netmask});
return "BOOTPROTO=none\n" .
"IPADDR=".$PrivateInterface{IPAddress}."\n" .
"NETMASK=".$PrivateInterface{Netmask}."\n" .
"NETWORK=$network\n" .
"BROADCAST=$broadcast";
}
}
after a
/etc/e-smith/events/actions/update-ifcfg
should do the trick ( not tested).
NOTE:
- I have planned ' return "BOOTPROTO=none" if ($PrivateInterface{Configuration} eq "dhcp");' but surely will not work as SME is not configured to listen and act as dhcp client on this interface; would need more work on this side...
- the interface should be up, but you will then need to configure the firewall to have a service to be able to be reached.
Here some reading :
https://wiki.contribs.org/FirewallTo be short, you will need to rewrite a part of the SME firewall called "masq", which is templated. Could be easy or long depending on your needs.. Reading your needs it should be easy as sme will act as a client to the NAS.
in files : 00setup, 10ETHTOOL, 90otherparams
and then reboot,
with no success and no changes (even no errors )
Does anybody has any clue for making it work ?
I'm confused as adding and configuring a new NIC is rather easy and well documented on any other linux distro or even on freebsd.
it is easier to hack your way on such system, but it is also easier to make them a brick without any easy chance to go back to normal. SME is intended to enhance stability :
https://wiki.contribs.org/Template_Tutorial#Why_do_all_this_by_design_.3F