Why don't you use a post-install script like the following (not tested)?

========================================
#!/bin/sh

# add all your interfaces...
for i in eth0 eth1; do
    # configuration file
    cfg=/etc/sysconfig/network-scripts/ifcfg-$i

    # mac address
    hwaddr=`/sbin/ifconfig $i 2>/dev/null | sed -ne "s/.*HWaddr //p"`

    # check if HWADDR label is already present in the config file
    if grep -q HWADDR $cfg; then
        # replace
        perl -pi -e "s/HWADDR=.*/HWADDR=$hwaddr/" $cfg
    else
        # add
        echo HWADDR=$hwaddr >> $cfg
    fi
done
========================================

Regards,
-Andrea

Jason Knudsen wrote:
> Hello,
> 
> I've been following a trail of bread crumbs to find out how to do 
> this... Adding a MAC Address to the ifcfg-eth* card with systemconfigurator
> 
> Essentially I'm passing a variable into my PXEBOOT file called 
> MACADDRESS=00:00:00:00:00 and when I've initiated a reimage of a host 
> this VARIABLE will show up in the file 
> /tmp/kernel_append_parameter_variables.txt .. So far, So Good.
> 
> The missing link is what happens inbetween but somehow this MACADDRESS 
> must end up in the /tmp/variables.txt file which gets called by the 
> MASTERFILE that will in turn pass that variable along to 
> SYSTEMCONFIGURATOR to configure this towards the end of installation.
> 
> What I've seen is that a tool in the client called /etc/init.d/functions 
> is what grabs this data from the kernel_append file and parses that 
> information into the /tmp/variables file. So it would seem like a simple 
> thing to edit the functions file to include the MAC ADDRESS variable 
> string. echo "MACADDRESS=$MACADDRESS" >> /tmp/variables.txt
> 
> But for the life of me I cannot find where the /etc/init.d/functions 
> file gets created... It's not in the boel_binaries.tar.gz file and it 
> doesn't appear anywhere on my server...
> 
> Some of my hosts need the MAC address to be set in order to boot 
> properly.. otherwise networking gets messed up and it's a no-show. I 
> know I could do a straight forward calling of the /tmp/kernel_append 
> file but that seems like an ugly hack to me and I want to understand the 
> full process regardless.
> 
> Thanks for any help
> 
> Jason
> 

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
sisuite-users mailing list
sisuite-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sisuite-users

Reply via email to