aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts
Commit message (Collapse)AuthorAgeFilesLines
* ifup-post: fix incorrect condition for RESOLV_MODSDavid Kaspar [Dee'Kej]2018-08-241-1/+1
| | | | | | | | | | This was causing the /etc/resolv.conf file to be always updated when RESOLV_MODS was not set... Before the commit 5d6156454bf8f6dab4a5fdd7e1bf6 we were not updating the /etc/resolv.conf file if the RESOLV_MODS was empty. See https://bugzilla.redhat.com/show_bug.cgi?id=1610411 for more info.
* ifdown-eth: no longer needed 'pidof -x dhclient' condition removedDavid Kaspar [Dee'Kej]2018-07-241-2/+2
| | | | | | | | | | Previously, there were 2 additional conditions related to this part of code, but they were removed in time, so this last condition has remained an artifact and is de-facto obsolete. However, the 'pidof -x dhclient' condition could cause the network service to hang on stop/restart when processes were executed from a network share... Removing that condition should hypothetically fix it.
* network-scripts: setting of firewall ZONE fixedDavid Kaspar [Dee'Kej]2018-06-073-5/+6
| | | | | | | | | | | | | For currently unknown reason the dbus-send calls will fail to set the firewall zone for the given interface if we omit the --print-reply option... This looks like some kind of race-condition in dbus-send, since the --print-reply makes the call synchronous and slower. Hopefully this is only a temporary workaround until DBus is fixed. Resolves: #1586284
* network-functions: use tr to upper case strings rather than awkMatteo Croce2018-05-171-3/+3
| | | | | | | | | | | | | | | | | | | | network-functions uses awk to tranform the mac address to upper case. Replace awk with tr which is two order of magnitude faster: $ time awk '{ print toupper($0) }' </usr/share/dict/words >/dev/null real 0m0,227s user 0m0,224s sys 0m0,004s $ time tr '[a-z]' '[A-Z]' </usr/share/dict/words >/dev/null real 0m0,005s user 0m0,000s sys 0m0,005s Also use here-strings instead of spawning a subshell and a pipe. Signed-off-by: Matteo Croce <mcroce@redhat.com>
* network-functions: add error messages for bonding installationDavid Kaspar [Dee'Kej]2018-05-171-5/+17
| | | | | | | | | | | | | Instead of displaying messages without context, like this: ./network-functions: line 571: echo: write error: Invalid argument ./network-functions: line 598: echo: write error: Permission denied We will now display pretty error messages (via net_log) about what has actually failed... This has been requested by our customer: https://bugzilla.redhat.com/show_bug.cgi?id=1542514
* ifdown-post: fix logical error in commit 5d61564David Kaspar [Dee'Kej]2018-01-021-1/+1
| | | | | | | Empty ${RESOLV_MODS} was causing a deletion of config files in /etc/ppp/peers/* Resolves: #155
* network-functions: use POSIX forwarding instead of bash-ismDavid Kaspar [Dee'Kej]2017-11-093-3/+3
|
* ifup-post: always update nameserver & search entries in /etc/resolv.confDavid Kaspar [Dee'Kej]2017-11-023-75/+135
| | | | | | | | | | | | | | | | | | | | This is complete rework of how we generate the /etc/resolv.conf. Fixes: * always update 'nameserver' & 'search' entries when DNS* & DOMAIN options (respectively) were updated in ifcfg-* files * always update the order of 'nameserver' entries when the order of DNS* options was updated Enhancements: * added support for DNS3 option (equals to MAXNS value in GLIBC) * added logic to process duplicate DNS* options * added logic to process randomly omitted DNS* options (e.g. omitting DNS1 while specifying DNS2 and/or DNS3 will still work now) This work was based on these two RHEL-7.5 BZs: https://bugzilla.redhat.com/show_bug.cgi?id=1364895 https://bugzilla.redhat.com/show_bug.cgi?id=1357658
* ifup-eth: wait for STP to complete setup on bridge if $DELAY is not setDavid Kaspar [Dee'Kej]2017-10-311-4/+21
| | | | | Otherwise obtaining IP from DHCP might fail. Based on patch from: * Rich Alloway <richard.alloway@roguewave.com> | CentOS BZ #0011138
* init.d/functions: convert2sec() function addedDavid Kaspar [Dee'Kej]2017-10-311-1/+1
| | | | | | | | | | And network-scripts/network-functions was patched to use convert2sec(). This function can be used to convert the value of its first parameter to a number of seconds - based on the time unit (specified as the second parameter). This is mostly useful for converting values for use with the sleep(1).
* Replace usleep(1) calls with sleep(1) callsDavid Kaspar [Dee'Kej]2017-10-312-3/+7
| | | | | The time units had to be manually converted from microseconds to seconds. Hopefully this was done right.
* network-scripts: forward DBus calls to /dev/nullDavid Kaspar [Dee'Kej]2017-10-312-2/+4
|
* network-scripts: firewall-cmd replaced with DBus callsDavid Kaspar [Dee'Kej]2017-10-313-11/+22
| | | | | To speed things up. Based on patch & comments from: https://bugzilla.redhat.com/show_bug.cgi?id=1497759
* ARPUPDATE introducedDavid Kaspar [Dee'Kej]2017-10-163-2/+10
| | | | | | | | | The ARPUPDATE option has been introduced. It defaults to 'yes'. By setting the ARPUPDATE to 'no', administrator can disable updating neighbouring computers with ARP information about current NIC. This is especially needed when using LVS Load Balancing with Direct routing enabled.
* DHCP_FQDN and DHCP_SEND_HOSTNAME introducedDavid Kaspar [Dee'Kej]2017-05-032-14/+38
| | | | | | | | | | | | | | The way DHCP_HOSTNAME is being sent to DHCP server has been completely reworked... DHCP_FQDN now allows user to specify fully qualified domain name to be sent to DHCP server instead of just using simple hostname. This option takes precedence before DHCP_HOSTNAME variable. DHCP_SEND_HOSTNAME can be used to tell initscripts to not send either DHCP_HOSTNAME or DHCP_FQDN to DHCP server. Both of these options should behave same as they do in NetworkManager.
* re-add missing $HOSTNAME initializationDavid Kaspar [Dee'Kej]2017-05-031-3/+5
|
* ifup: add support for VLAN_EGRESS_PRIORITY_MAPLukas Nykryn2017-05-031-0/+2
|
* ifdown-eth: we need to flush global scope as wellLukas Nykryn2017-03-301-1/+4
| | | | ... but it is stuck some time
* ifup-eth: remove quote marksLukas Nykryn2017-03-221-1/+1
| | | | | With quote marks all the parameters to dhclient are passed as one Resolves: #1410429
* 9.70-sync: sysconfig/network-scripts/* updated - part 2David Kaspar [Dee'Kej]2017-03-2219-2139/+2261
| | | | | This commit contains a lot of whitespace changes. Use 'git diff --ignore-all-space' to display the relevant changes.
* 9.70-sync: sysconfig/network-scripts/* updated - part 1David Kaspar [Dee'Kej]2017-03-225-79/+77
| | | | This commit contains only whitespace & indentation style changes.
* network: load NetworkManager connection via dbusPetr Horáček2017-02-141-1/+9
| | | | | Use dbus to refresh configuration files for NetworkManager in order to make ifup and ifdown faster.
* network: check for running NetworkManager via dbusPetr Horáček2017-02-141-1/+5
| | | | Use dbus instead of nmcli to make ifup command faster.
* ifup-eth: fix setting preferred_lft and valid_lftLukas Nykryn2016-06-231-1/+1
| | | | | Cherry-picked from: 1087a2776ab6d27c65233918db7cffecd326dec0 Resolves: #1240775
* ifup: don't call nmcli on any lo deviceLukas Nykryn2016-06-162-2/+2
| | | | Resolves: #1336869
* ipv6: wait for all global IPv6 addresses to leave the "tentative" stateLukas Nykryn2016-06-132-0/+23
| | | | | Cherry-picked from: c188044 Resolves: #1245951
* source_config: tell NetworkManger to load ifcfg file even for NM_CONTROLLED=noThomas Haller2016-06-131-4/+6
| | | | | Cherry-picked from: 61fb1cb Resolves: #1345919
* ifup-aliases: inherit ARPCHECK from parent deviceLukas Nykryn2016-06-091-1/+2
| | | | | Cherry-picked from: c93ddceaa09d59be56b2b5dd64ab38febb5fafb2 Resolves: #1273286
* ifup-eth: fix typo in error message (#1038776)Václav Pavlín2016-06-091-1/+1
| | | | | Cherry-picked from: 9a55596dbdc402348e56c3f519e6218e8708a5e2 Resolves: #1257544
* ifup: set valid_lft and preferred_lft to forever for static ipBlake Caldwell2016-05-301-0/+3
| | | | | Cherry-picked from: 1a4607f Resolves: #1240775
* ifup-post: check resolve.conf also with DNS2Lukas Nykryn2016-05-261-1/+8
| | | | | Cherry-picked from: da08727f3bbcc419096b160968aee83104bb7cf6 Resolves: #1316019
* ifdown-post: remove resolv.conf only in specific casesLukas Nykryn2016-05-261-1/+2
| | | | | Cherry-picked from: 3d1f30095582f84206826f7ede970c45e5a6b5ba Resolves: #1273435
* network-functions: is_available_wait should wait even in the case that ↵Lukas Nykryn2016-05-261-4/+2
| | | | | | | is_available returns 2 Cherry-picked from: 1f230a3d2e2733e30577c91645005801ab2c0f40 Resolves: #1339648
* ifup-eth: some bridge options are applied laterLukas Nykryn2015-09-161-1/+3
|
* network-functions: fix wireless detectionLukas Nykryn2015-08-071-1/+1
|
* network-functions: reeplace iwconfig with iwValdis Kletnieks2015-07-011-2/+2
|
* bonding: warn if the ifup for slave device failedLukas Nykryn2015-06-081-1/+1
|
* network-functions: fix check in install_bonding_driverLukas Nykryn2015-05-061-1/+1
|
* ifup-aliases: don't return with error when arping failsLukas Nykryn2015-05-061-1/+2
|
* network-functions: fix change_resolv_conf after grep updateLukas Nykryn2015-05-061-4/+4
|
* ifup: don't call NM for loopbackLukas Nykryn2015-05-061-1/+1
|
* ifup: add missing quotesLukas Nykryn2015-04-241-1/+1
|
* ifdown-ipv6: reset addrgenmode to eui64 for deviceLukas Nykryn2014-12-161-0/+1
|
* ifup: fix typoLukas Nykryn2014-12-161-1/+1
|
* adjust LINKDELAY when STP is onLaine Stump2014-11-121-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | This resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1162822 When ifup is called on an interface that has BOOTPROTO=dhcp, ifup-eth will call network-functions:check_link_down() to wait for carrier on the interface before starting dhclient. If the interface happens to be a bridge device, carrier will not come on until at least one attached device is in "forwarding" mode. If the bridge has STP enabled, it takes at least $DELAY * 2 + 5 seconds (sometimes slightly longer) for any attached device to go into forwarding mode. However, check_link_down() will only wait for max(${LINKDELAY}, 5) seconds for carrier, and there are *many* existing configs that have STP enabled but no setting for LINKDELAY. Every one of those configs will now fail to ifup the bridge device. The solution implemented in this patch is for ifup-eth to set LINKDELAY to at least ${DELAY} * 2 + 7 when the device is a bridge an STP is enabled. Since check_link_down() returns within .5 sec of carrier coming up, the worst effect this could have would be to take longer to fail in the case of a config where carrier was *never* going to come up. Otherwise, it will not create any more delay than is already present in cases that currently work, and will cause many other configs to become unbroken.
* ifup,vlan: fix typoLukas Nykryn2014-10-241-1/+1
|
* network_function: return immediately when device is presentLukas Nykryn2014-09-231-1/+1
|
* network-functions: grep->fgrep in bonding masters matchingLukas Nykryn2014-09-191-1/+1
|
* is_available_wait: properly propage return value from is_availableLukas Nykryn2014-09-171-1/+4
|
* network-functions: improve bonding_masters grepLukas Nykryn2014-09-161-1/+1
| | | | | | | kudos to john.haxby@oracle.com Conflicts: sysconfig/network-scripts/network-functions