Re: custom hw_detect script not working due to biosdevname
James Abbatiello <[email protected]> Sun, 15 Feb 2015 15:48:05 -0500
| Newsgroups | gmane.comp.python.cheetah |
|---|---|
| Message-ID | <CANhYFp1J2S0zn3FqXqNk+yoHOBHY1cpqeMuHysWJbjBOqPukaA@mail.gmail.com> |
--===============8194014066732819785== Content-Type: multipart/alternative; boundary=089e0149c05456e3f7050f2697fb --089e0149c05456e3f7050f2697fb Content-Type: text/plain; charset=UTF-8 This seems more like a cobbler question than a cheetah question. Does the Networking section on http://www.cobblerd.org/manuals/2.6.0/3/5_-_Kickstart_Templating.html help at all? -- James Abbatiello On Sun, Feb 15, 2015 at 2:34 PM, Jagga Soorma <[email protected]> wrote: > Hi All, > > We have been using cobbler to provision servers for a few weeks now on > hp hardware without any issues. We just got one dell server and all > of a sudden my networking is screwed up and looks like it is due to > how dell servers behave due to the biosdevname package by default. On > the dell server my interface is setup as em1 instead of eth0 and this > is what I am doing in one of my cobbler snippets that is now broken > due to me looking explicitly for eth0: > > -- > $ cat centos66/hw-detect > #set $mac = $getVar('$mac_address_eth0') > #if $mac > #set $mac_prefix = $mac[0:8] > #if $mac_prefix == "00:0c:29" or $mac_prefix == "00:05:69" or > $mac_prefix == "00:50:56" > #set global $machinetype='virtual' > #else > #set global $machinetype='physical' > #end if > #end if > -- > > This is just a quick way for me to detect if it is a virtual or > physical machine. How can I test for the existence of em1 instead? > So basically it would check eth0 if that is what is being defined by > the user or em1 if that is what is being added on the "cobbler system > add" command. > > I tried just using $getVar("mac_address") but that does not seem to > work. Any help would be greatly appreciated. > > Thanks! > > > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming. The Go Parallel Website, > sponsored by Intel and developed in partnership with Slashdot Media, is > your > hub for all things parallel software development, from weekly thought > leadership blogs to news, videos, case studies, tutorials and more. Take a > look and join the conversation now. http://goparallel.sourceforge.net/ > _______________________________________________ > Cheetahtemplate-discuss mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss > --089e0149c05456e3f7050f2697fb Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div>This seems more like a cobbler question than a cheeta= h question.=C2=A0 Does the Networking section on <a href=3D"http://www.cobb= lerd.org/manuals/2.6.0/3/5_-_Kickstart_Templating.html">http://www.cobblerd= .org/manuals/2.6.0/3/5_-_Kickstart_Templating.html</a> help at all?<br><br>= -- <br></div>James Abbatiello<br></div><div class=3D"gmail_extra"><br><div = class=3D"gmail_quote">On Sun, Feb 15, 2015 at 2:34 PM, Jagga Soorma <span d= ir=3D"ltr"><<a href=3D"mailto:[email protected]" target=3D"_blank">jagga= [email protected]</a>></span> wrote:<br><blockquote class=3D"gmail_quote" sty= le=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi All= ,<br> <br> We have been using cobbler to provision servers for a few weeks now on<br> hp hardware without any issues.=C2=A0 We just got one dell server and all<b= r> of a sudden my networking is screwed up and looks like it is due to<br> how dell servers behave due to the biosdevname package by default.=C2=A0 On= <br> the dell server my interface is setup as em1 instead of eth0 and this<br> is what I am doing in one of my cobbler snippets that is now broken<br> due to me looking explicitly for eth0:<br> <br> --<br> $ cat centos66/hw-detect<br> #set $mac =3D $getVar('$mac_address_eth0')<br> #if $mac<br> #set $mac_prefix =3D $mac[0:8]<br> #if $mac_prefix =3D=3D "00:0c:29" or $mac_prefix =3D=3D "00:= 05:69" or<br> $mac_prefix =3D=3D "00:50:56"<br> #set global $machinetype=3D'virtual'<br> #else<br> #set global $machinetype=3D'physical'<br> #end if<br> #end if<br> --<br> <br> This is just a quick way for me to detect if it is a virtual or<br> physical machine.=C2=A0 How can I test for the existence of em1 instead?<br= > So basically it would check eth0 if that is what is being defined by<br> the user or em1 if that is what is being added on the "cobbler system<= br> add" command.<br> <br> I tried just using $getVar("mac_address") but that does not seem = to<br> work.=C2=A0 Any help would be greatly appreciated.<br> <br> Thanks!<br> <br> ---------------------------------------------------------------------------= ---<br> Dive into the World of Parallel Programming. The Go Parallel Website,<br> sponsored by Intel and developed in partnership with Slashdot Media, is you= r<br> hub for all things parallel software development, from weekly thought<br> leadership blogs to news, videos, case studies, tutorials and more. Take a<= br> look and join the conversation now. <a href=3D"http://goparallel.sourceforg= e.net/" target=3D"_blank">http://goparallel.sourceforge.net/</a><br> _______________________________________________<br> Cheetahtemplate-discuss mailing list<br> <a href=3D"mailto:[email protected]">Cheetahtem= [email protected]</a><br> <a href=3D"https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-dis= cuss" target=3D"_blank">https://lists.sourceforge.net/lists/listinfo/cheeta= htemplate-discuss</a><br> </blockquote></div><br></div> --089e0149c05456e3f7050f2697fb-- --===============8194014066732819785== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ Dive into the World of Parallel Programming. The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ --===============8194014066732819785== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Cheetahtemplate-discuss mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss --===============8194014066732819785==--