summaryrefslogtreecommitdiffstats
path: root/loader/net.c
Commit message (Collapse)AuthorAgeFilesLines
* Retry network configuration in loader (#492009)David Cantrell2009-05-051-1/+6
| | | | | | Rewrite disabled network configuration scripts in loader if we ask the user to retry network configuration. nm-system-settings will pick up the change to those files and down those interfaces.
* Configure network in kickstartNetworkUp() iff NM is not connected (#490518)David Cantrell2009-04-301-0/+3
| | | | | | In kickstartNetworkUp(), call is_nm_connected() to see if we are in NM_STATE_CONNECTED. If we are in any other state, prompt for network configuration and start NetworkManager.
* Revert "Work around gcc bug #492973"David Cantrell2009-03-311-1/+1
| | | | | | This reverts commit 5a0189827c1c6db21ecbfd01f00ee1f5edbb7a77. gcc-4.4.0-0.31 in rawhide fixes the problem we were seeing.
* Work around gcc bug #492973David Cantrell2009-03-301-1/+1
| | | | | | | | | Problem with -O2 and some string functions with the latest version of gcc in rawhide. Work around the problem for now so we can compile, ideally we can revert this patch in the future. gcc bug: https://bugzilla.redhat.com/show_bug.cgi?id=492973
* Do not prompt for NIC selection in cmdline mode (#492586)David Cantrell2009-03-301-0/+9
| | | | | If we need to ask the user which NIC to use and are in cmdline mode, tell them we cannot do that and exit.
* Fix build errors in the new net.c code.Chris Lumens2009-02-131-7/+7
|
* Add iBFT support to loaderMartin Sivak2009-02-121-2/+108
|
* Create a loop for dbus and pump the loop to process all the dbus messages. ↵Jesse Keating2009-01-141-0/+16
| | | | | | | | | | | This fixes network bringup in loader. In a normal env, something like GTK processes all the dbus messages as part of it's main loop. We don't have anything like that in loader so we have to turn that crank manually, and enough times to clear out all the pending messages. Signed-off-by: David Cantrell <dcantrell@redhat.com>
* Check error from asprintf() correctly for dhcpclass handling.David Cantrell2008-12-171-1/+1
| | | | | | | If asprintf() errors, it returns -1. Check for that correctly and return 20 on error. [rawhide]
* Use libnm_glib in net.c:get_connection()David Cantrell2008-12-171-93/+14
| | | | | | Rather than getting the NetworkManager state over D-Bus, use the libnm_glib library to get the same information. Less verbose code that way.
* Use macros for D-Bus pathsDavid Cantrell2008-12-161-2/+2
|
* Remove XXX comment in net.c about GATEWAYDavid Cantrell2008-12-051-4/+0
| | | | | | In NetworkManager-world, we want the GATEWAY to be store per device rather than for the entire system, so what ifcfg-fedora is reading is the correct thing to do.
* Send unique vendor class identifier unless user specifies one.David Cantrell2008-12-051-18/+28
| | | | | | | | | | | | | | Restores functionality we had before the NM changeover. This was originally requested by gurulabs.com. Instead of sending just 'anaconda' as the vendor class identifier, send something like: anaconda-Linux 2.6.27.5-117.fc10.i686 i686 Of course, if we fail to collect that information, fall back on 'anaconda'. Guru Labs wanted this functionality for PXE booting as it allowed them to more easily control per-client/per-release settings from the DHCP server. My fault for not adding this back when the NM changeover happened.
* Let users edit net settings on network failure in stage 1 (#465887)David Cantrell2008-11-041-0/+4
| | | | | | | | | | | | | | | This one has been around for a while. If a user selects the wrong network interface in loader and waits for the failure message to appear, they are taken back to the 'select an interface' screen. They select the right interface, but loader used the TCP/IP settings entered the first time around. On network configuration failure and if we are doing an interactive install, blank out ipv4method and ipv6method so that we take the user to the TCP/IP configuration screen. I use ipv4method and ipv6method to figure out if a kickstart installation is beginning, so by blanking them out for the interactive install case, we get to take the user back to the TCP/IP settings screen.
* Do not write NM_CONTROLLED=yes to ifcfg files (#468028)David Cantrell2008-10-241-1/+0
| | | | | | Make the loader code match the behavior of the anaconda Python code. Only write NM_CONTROLLED=no. If a device is controlled by NM, don't write an NM_CONTROLLED line.
* Log D-Bus messages at ERROR or INFO level.David Cantrell2008-10-241-7/+7
| | | | | | Was using DEBUGLVL for all of the D-Bus messages. Make sure error messages are at the ERROR log level and info-type messages are at the INFO log level.
* Write dhcpclass to the dhclient conf file for the device (#468436)David Cantrell2008-10-241-0/+43
| | | | | | If the user passes dhcpclass= at the boot prompt, write the value to /etc/dhclient-DEVICE.conf as 'send vendor-class-identifier %s' so that NM will use those settings when sending the DHCP request.
* Don't display the entire lengthy device description (#467825).Chris Lumens2008-10-231-1/+1
|
* Make kickstart installs work again (#374271, #392021, #448096, #466340, #466304)David Cantrell2008-10-141-26/+24
| | | | | | Kickstart installs should work again like they did at one point. If you do not specify IP configuration parameters on the boot: line, loader assumes DHCP (which is what we've done forever).
* Write ifcfg files to /etc/sysconfig/network-scripts instead of /.tmpDavid Cantrell2008-10-141-15/+38
| | | | | | Writing to /.tmp proved to work, now to move the temporary files to a better location. Using /etc/sysconfig/network-scripts, but writing the files as ".ifcfg-DEVICE" and then renaming to ifcfg-DEVICE.
* Fix how configureTCPIP() returns.David Cantrell2008-10-101-16/+13
| | | | | | Clean up the loop termination and return value handling. Currently the configureTCPIP() function returns LOADER_NOOP if the user chose dhcp and LOADER_OK if the user chose manual configuration.
* Write NM_CONTROLLED=yes rather than NM_CONTROLLED=David Cantrell2008-10-101-1/+1
| | | | | | | | | I was told by upstream that NM_CONTROLLED= should be sufficient for nm-system-settings to pick up an interface for control. But the parsing in the ifcfg-fedora plugin for nm-system-settings is a little strange (shvar.c) and what happens when NM_CONTROLLED is empty isn't entirely clear. Set it to yes to avoid any possible problems.
* Get rid of some iface flags that were not doing anything anymore.David Cantrell2008-10-101-9/+11
| | | | | The ipv4method and ipv6method variables are in use now, remove flags that are not used anymore.
* Generate new config files in /.tmp in writeEnabledNetInfo()David Cantrell2008-10-101-7/+42
| | | | | | | Rather than writing new config files directly in /etc/sysconfig in writeEnabledNetInfo(), write them to /.tmp first and then move them in place using rename(2). Why /.tmp? rename() fails across different filesystems and this was the path of least resistance.
* Remove unused variables from configureTCPIP()David Cantrell2008-10-101-1/+1
|
* Do not call get_connection() twice for DHCP.David Cantrell2008-10-101-21/+2
| | | | | | | | Back with libdhcp, we needed to call pumpDhcpClassRun() in several locations. Moving to NM, I converted those calls to be calls to get_connection() instead. In this patch, the call to get_connection in configureTCPIP() has been eliminated because we should only be calling it from readNetConfig().
* Disable some more IPv6 checks.Chris Lumens2008-10-101-0/+4
|
* Do not segfault when going back to select a new interface (#465887)David Cantrell2008-10-091-2/+0
| | | | | | | | If you pick the wrong interface in anaconda and NM times out, you are placed at the configure TCP/IP screen again. If you select Back, you can go back and pick another interface (if you have more than one). Users going back to select a new interface were seeing segfaults, which is not what we want.
* Populate struct iface correctly in setupIfaceStruct()David Cantrell2008-10-091-14/+34
| | | | | This correctly brings over static IP settings. Went ahead and added code for more IPv6 values, but those are disabled for now.
* Reset resolver in get_connection()David Cantrell2008-10-061-0/+1
| | | | Call res_init() after NetworkManager says we are connected.
* Fix problems dealing with PXE boot and the ksdevice= parameter.David Cantrell2008-10-061-59/+38
| | | | | | | | | | Fix some problems with the interaction between kickstartNetworkUp() and setupNetworkDeviceConfig(). Do not assume dhcp and do not assume that a setting has been provided. Hopefully this will let people specify manual settings when doing a ks install. Renamed setupNetworkDeviceConfig() to setupIfaceStruct(), since that's really what it's doing now.
* Disable more IPv6 code in loader for now.David Cantrell2008-10-061-5/+32
| | | | | Wrapping more IPv6 code in ENABLE_IPV6 since NM does not yet support IPv6.
* Write BOOTPROTO=static for manual IPv4 config.David Cantrell2008-10-061-0/+2
|
* Disable IPv6 interface widgets in loader for now.David Cantrell2008-10-031-1/+49
| | | | | | | NetworkManager lacks IPv6 support at the moment, so disable the IPv6 interface widgets in loader for now. We're string frozen, so the manual IP entry screen in loader still tells you to enter an IPv4 or IPv6 address. Ooops.
* Write out NETMASK and BROADCAST correctly in loader.David Cantrell2008-09-181-2/+2
| | | | | | For static network configuration, make sure we write out the netmask and broadcast correctly (was writing out IP address for those settings) to the ifcfg-DEVICE file.
* Fix problems with manual network configuration in loader.David Cantrell2008-09-181-9/+12
| | | | | | | Correct the manual settings form loop in loader. Do not tell users they must have IPv6 settings when they disabled IPv6. Also, do not tell users they are missing IPv4 information when they filled in all fields.
* Always start NM so we can talk to it in the boot.iso case (#461071).Chris Lumens2008-09-111-12/+2
|
* Make NM work for the DHCP case, at least (dcbw) (#461071).Chris Lumens2008-09-051-7/+12
| | | | | | | | | | | This patch does two things: (1) It makes sure that NM doesn't run more than once, though we still need to figure out why it's being asked to start up several times. (2) Block the rest of the network configuration process from running until after NM is up and we can talk to it. This fixes the traceback where nothing is providing the .services file. We still need to investigate whether static network configuration works and how the UI flows in error cases.
* iface_start_NetworkManager() cleanupsDavid Cantrell2008-09-051-2/+2
| | | | | | No need to pass iface_t to iface_start_NetworkManager(). Remove unnecessary else { exit(0); } from the child process. Increase wait loop to 45 iterations.
* Don't pass NULL to dbus_message_unref()David Cantrell2008-08-281-1/+0
|
* Remove code not used in net.cDavid Cantrell2008-08-261-246/+8
| | | | | Remove debugging functions and DNS code that we don't need anymore.
* Make sure we wait for NetworkManager.David Cantrell2008-08-251-39/+46
| | | | | Give NetworkManager a fair amount of time to finish doing things.
* Renamed loader2 subdirectory to loader (hooray for git)David Cantrell2008-08-251-0/+2090
|
* remove old loader dir. for referencing, go back to anaconda-8-0-branchJeremy Katz2003-01-071-923/+0
|
* merge ia64 branch bits to have dns work in non-diet loadersJeremy Katz2002-07-291-1/+7
|
* add patch for #21088 (<sopwith@redhat.com>)Bill Nottingham2002-06-181-0/+4
|
* get the easy bits of the merge first.... hampton loader and isys directoriesJeremy Katz2002-04-191-21/+18
| | | | should be fine since I had originally just copied them into hampton from head :)
* merge most of the s/390 loader changes. as with the last batch, an emailJeremy Katz2001-12-271-23/+40
| | | | about these will be coming soon
* changes for dietlibcErik Troan2001-11-131-7/+1
|
* Change all Ok to OKMike Fulbright2001-08-101-5/+5
|