[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Any ideas why this fails?:



The other thing to do is get it to kickstart boot one way or another up through "stage2.img" and then try to run the script manually on the virtual console with a shell prompt. That's how I debugged my "%pre" scripts...

			- Matt

Riggs, Ben wrote:
Good question. I hadn't thought that it might not be in anaconda's path.

Matt Fahrner wrote:
Are you sure "ifconfig" is in your path?

Riggs, Ben wrote:
<snip>
%include /tmp/network-include

%pre --interpreter /usr/bin/python
#find-ethN configures network info
import os

#Determine which ethN interface matches mac address supplied by ldap
network_statement = "network --bootproto=dhcp --onboot=on --noipv6"
pipe = os.popen("ifconfig -a", 'r')
for line in pipe.readlines():
    if '00:e0:81:33:d6:c7' in line.lower():
network_statement = "".join((network_statement, " --device=", line.split()[0].strip(), "\n"))
file = open("/tmp/network-include", 'w')
file.write(network_statement)
file.close()
</snip>

I can't find anything glaringly obvious. I know the python works. When anaconda runs, it still asks for network info manually.

_______________________________________________
Kickstart-list mailing list
Kickstart-list redhat com
https://www.redhat.com/mailman/listinfo/kickstart-list


_______________________________________________
Kickstart-list mailing list
Kickstart-list redhat com
https://www.redhat.com/mailman/listinfo/kickstart-list

--
---------------------------------------------------------------------
Matt Fahrner                                    2 South Park St.
Chief Systems Architect                         Willis House
Burlington Coat Factory Warehouse               Lebanon, N.H.  03766
Tel: (603) 448-4100 x5150                       USA
Fax: (603) 443-6190                             Matt Fahrner COAT COM
---------------------------------------------------------------------


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]