aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig
Commit message (Collapse)AuthorAgeFilesLines
* Repository scheme updated to new layoutDavid Kaspar [Dee'Kej]2018-05-3029-5014/+0
| | | | | NOTE: This commit just moves files around, without actually fixing the Makefiles and specfile. See follow up commits which resolve this.
* sysconfig/readonly-root: Clarify the usage of readonly-root.David Kaspar [Dee'Kej]2018-05-171-0/+2
| | | | | ... Without appending the 'ro' to mount options of '/' mount point the system will be still mounted as read-write, even when READONLY=yes.
* use proper shebangMatteo Croce2018-05-173-3/+3
| | | | | | | | $" is a BASH extension to translate text. Replace the shebang with /bin/bash to avoid parsing errors, as even BASH has a POSIX compliant mode when run as sh. Signed-off-by: Matteo Croce <mcroce@redhat.com>
* 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...
* ifdown-eth: no longer needed 'pidof -x dhclient' condition removedDavid Kaspar [Dee'Kej]2018-05-171-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.
* ifup-tunnel: Support 'external' tunnels (#172)Phil Dibowitz2018-03-271-5/+9
| | | | | | | | | | | | | | * ifup-tunnel: Support 'external' tunnels This is a newish feature upstream. You can now set the external flag on a ip6_tunnel type interface (though not the primary one, ip6tnl0), and doing so will allow it to decapsulate any packet, and assuming that the inner address is the one on that interface, it'll drop it back on the stack. This is useful for DSR vips. While v6-in-v6 was already supported, this allows v4-in-v6 which is necessary to serve v4 traffic in a v6only infrastructure. There's comments in ifup-tunnel that imply it was designed only for GRE tunnels, but this still seems like the best place for this.
* 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-10-313-75/+139
| | | | | | | | | | | | | | | | | | | | | | 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 * always keep /etc/resolv.conf.save as a proper backup - do not overwrite it everytime when updating 'nameserver' or 'search' 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
* network-scripts: forward DBus calls to /dev/nullDavid Kaspar [Dee'Kej]2017-10-312-2/+4
|
* Spelling fixesVille Skyttä2017-10-302-3/+3
|
* Use grep -E instead of deprecated egrepVille Skyttä2017-10-301-1/+1
|
* network-scripts: firewall-cmd replaced with DBus callsDavid Kaspar [Dee'Kej]2017-10-163-11/+22
| | | | | To speed things up. Based on patch & comments from: https://bugzilla.redhat.com/show_bug.cgi?id=1497759
* 'debugmode' subpackage dropped completelyDavid Kaspar [Dee'Kej]2017-10-161-14/+0
| | | | | | | | | | | Using this package was very dangerous, and could lead to instability of system, or even being unable to bootup at all, and value of this functionality was at least questionable, and was not documented. We decided to drop functionality completely, to make sure users do not install it accidentally (e.g. by using globbing with 'dnf install'). Resolves: #69
* sysconfig/init* files droppedDavid Kaspar [Dee'Kej]2017-10-162-38/+0
| | | | | Users can still create the /etc/sysconfig/init file manually to override the default values, which are now taken from init.d/functions.
* ifup-eth: wait for STP to complete setup on bridge if $DELAY is not setDavid Kaspar [Dee'Kej]2017-08-071-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-08-071-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 /var/run with /run everywhereZbigniew Jędrzejewski-Szmek2017-08-039-20/+20
| | | | https://bugzilla.redhat.com/show_bug.cgi?id=1471489
* ARPUPDATE introducedDavid Kaspar [Dee'Kej]2017-07-143-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.
* Replace usleep(1) calls with sleep(1) callsDavid Kaspar [Dee'Kej]2017-05-252-3/+7
| | | | | The time units had to be manually converted from microseconds to seconds. Hopefully this was done right.
* 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-04-261-3/+5
|
* ifup: add support for VLAN_EGRESS_PRIORITY_MAPLukas Nykryn2017-04-111-0/+2
|
* ifdown-eth: we need to flush global scope as wellLukas Nykryn2017-03-281-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
* ipv6_add_addr_on_device: replace the existing address on NICDavid Kaspar [Dee'Kej]2017-02-271-1/+1
| | | | | | | | Instead of adding the IPv6 address when ifup is called, we replace the address, because it might have been auto-assigned before by RA. This is to assure that static NIC configuration will take effect if the NIC was already dynamically configured by RA.
* 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.
* sysconfig/network: NO_DHCP_HOSTNAME option introducedDavid Kaspar [Dee'Kej]2016-11-162-9/+29
| | | | | | | Previously, some administrators were unable to force initscripts to not obtatin hostname from DHCP, even though they were using static configuration of network. Righ now, setting 'NO_DHCP_HOSTNAME' to 'yes', 'true' or '1' in /etc/sysconfig/network will allow them to do so.
* fix typo in IPV6_SET_SYSCTLSPavel Šimerda2016-11-151-1/+1
| | | | | | | Typo introduced in commit 432951d. Related: https://github.com/fedora-sysv/initscripts/pull/2 Signed-off-by: Pavel Šimerda <pavlix@pavlix.net>
* network-functions: do not send hostname via dhclient everytimeDavid Kaspar [Dee'Kej]2016-11-102-9/+25
|
* ipv6_wait_tentative(): exit immediately when dadfailed occursDavid Kaspar [Dee'Kej]2016-11-011-3/+22
|
* ifup-eth: if arping fails, output responding MACLukas Nykryn2016-10-312-4/+6
| | | | Resolves: #1099026
* ifup-post: introduce new configuration option NOROUTESETDavid Kaspar [Dee'Kej]2016-10-311-1/+3
| | | | This has patch has been suggested in RHBZ #950453, by Konrad Moson.
* ifup-post: use is_false() function instead of checking for "no" stringDavid Kaspar [Dee'Kej]2016-10-311-2/+5
|
* ifup-aliases: send gratuitous ARPs when adding addressesLukas Nykryn2016-10-311-0/+6
|
* Add ability to specify arbitrary route optionsPhil Dibowitz2016-10-271-0/+2
| | | | | | | | | | | | `ifup` can set _some_ route options. Today it's missing several and so, to set something like `mtu` or `advmss` you have to do hacks like: ``` METRIC='10 mtu 1480' ``` which is sub-optimal. Rather than one-off add support for everything in the man page, provide a hook for arbitrary extra route options.
* Fix typo'd variable in 6to4 cleanupPhil Dibowitz2016-10-121-2/+2
| | | | | | Thanks to shellcheck. :) This is ontop of the whitespace PRs, those should go in first.
* Use the is_true() and is_false() functions where possibleDavid Kaspar [Dee'Kej]2016-10-126-11/+11
|
* [3/3] Remove tabs and fix spacing: ifup/ifdown scriptsPhil Dibowitz2016-10-1219-779/+782
|
* [2/3] Remove tabs and fix spacing: network-functionsPhil Dibowitz2016-10-121-284/+289
|
* [1/3] Remove tabs and fix spacing: ipv6 scriptsPhil Dibowitz2016-10-124-1151/+1149
| | | | | | | | | | | | | | | | | The network-scripts are a mix of tabs and spaces (!!) as well as completely inconsistent indentation (some 2, some 4). This is a series of 3 patches to move the entire of network-scripts to 2-space indentation for consistency so I can develop on the codebase without my brain bleeding. I don't feel strongly about 2 vs 4... 2 was just most common in the first file I picked, so I used that. This set is in 3 sets for easier reviewing and easier reverting if necessary: * 1/3 - ipv6 files * 2/3 - network-functions - it needed it's own * 3/3 - ifup/ifdown files
* Allow someone to keep accept_ra on while using static addresses.Phil Dibowitz2016-10-101-1/+3
| | | | | | | It's reasonable (and common) to assign static addresses while still wanting to get your default gw from your router. The assumption that not wanting SLAAC means not wanting RA is flawed, but I don't want to break backwards compatability, so I'm adding an additional option.
* Provide a mechanism to prevent network-scripts from messing with sysctlsPhil Dibowitz2016-10-103-33/+42
| | | | | | | | | | | network-scripts makes odd assumptions, like if I don't want SLAAC (i.e. if I turn off AUTOCONF) that I also don't want RA. This is not true, it's common to have a static local address, but to get my gateway through RA. This is one solution. I will also be sending a more specific solution to enable the above directly, but having a way to tell network-scripts to not mess with systctls seems generally useful.
* ifup-eth: fix setting preferred_lft and valid_lftLukas Nykryn2016-06-231-1/+1
|
* ifup: don't call nmcli on any lo deviceLukas Nykryn2016-06-162-2/+2
| | | | Resolves: #1336869
* source_config: tell NetworkManger to load ifcfg file even for NM_CONTROLLED=noThomas Haller2016-06-131-4/+6
|
* ipv6: wait for all global IPv6 addresses to leave the "tentative" stateLukas Nykryn2016-06-132-0/+23
|
* ifup: set valid_lft and preferred_lft to forever for static ipBlake Caldwell2016-05-301-0/+3
|