summaryrefslogtreecommitdiff
path: root/src/conf_mode/host_name.py
AgeCommit message (Collapse)Author
2024-01-01T5474: establish common file name pattern for XML conf mode commandsChristian Breunig
We will use _ as CLI level divider. The XML definition filename and also the Python helper should match the CLI node. Example: set interfaces ethernet -> interfaces_ethernet.xml.in set interfaces bond -> interfaces_bond.xml.in set service dhcp-server -> service_dhcp-server-xml.in (cherry picked from commit 4ef110fd2c501b718344c72d495ad7e16d2bd465)
2023-12-30system: T5877: Shorten system domain-search config pathIndrajit Raychaudhuri
Shorten and simplify `system domain-search` config path from: ``` set system domain-search domain <domain1> ``` to: ``` set system domain-search <domain1> ``` This will shorten the path and also make consistent with `domain-search` config in other places (like `dhcp-server`). (cherry picked from commit f77bf573c608b6c09182e1bad4312c4dd1e5195e)
2023-07-16T5195: fix remaining references to decommissioned vyos.utilChristian Breunig
2023-07-14T5195: vyos.util -> vyos.utils package refactoring (#2093)Christian Breunig
* T5195: move run, cmd, call, rc_cmd helper to vyos.utils.process * T5195: use read_file and write_file implementation from vyos.utils.file Changed code automatically using: find . -type f -not -path '*/\.*' -exec sed -i 's/^from vyos.util import read_file$/from vyos.utils.file import read_file/g' {} + find . -type f -not -path '*/\.*' -exec sed -i 's/^from vyos.util import write_file$/from vyos.utils.file import write_file/g' {} + * T5195: move chmod* helpers to vyos.utils.permission * T5195: use colon_separated_to_dict from vyos.utils.dict * T5195: move is_systemd_service_* to vyos.utils.process * T5195: fix boot issues with missing imports * T5195: move dict_search_* helpers to vyos.utils.dict * T5195: move network helpers to vyos.utils.network * T5195: move commit_* helpers to vyos.utils.commit * T5195: move user I/O helpers to vyos.utils.io
2022-04-16vyos.base: use Warning() helper where applicableChristian Poessinger
2021-10-22hosts: T2683: Allow multiple entries for static-host-mappingViacheslav
2021-09-05name-server: T3804: merge "system name-servers-dhcp" into "system name-server"Christian Poessinger
We have "set system name-server <ipv4|ipv6>" to specify a name-server IP address we wan't to use. We also have "set system name-servers-dhcp <interface>" which does the same, but the name-server in question is retrieved via DHCP. Both CLI nodes are combined under "set system name-server <ipv4|ipv6|interface>" to keep things as they are in real life - we need a name-server. (cherry picked from commit 2ecf7a9f9cbe9359457bd23b4a0c45f3763123c7)
2020-08-31configd: T2582: add scripts to include list for daemonJohn Estabrook
2020-08-10host_name: T2784: remove unused importsJohn Estabrook
2020-08-10host_name: T2784: remove unused arg in verify, unneeded arg in get_configJohn Estabrook
2020-06-26T2654: Remove overzealous error checkingkroy
2020-06-11host_name: T2486: remove pdns-recursor restartJernej Jakob
It shouldn't be required, if necessary it should be added to vyos-hostsd apply command.
2020-06-11host_name: T2486: configure vyos-hostsdJernej Jakob
Removes and adds all required settings.
2020-06-11host_name: T2486: remove conf.exists callsJernej Jakob
The getter methods will return empty values if config nodes don't exist, so there's no point in checking if they exist before.
2020-06-11host_name: T2486: move Config() call into mainJernej Jakob
Init Config once in main() and pass it to both get_config() and verify().
2020-06-11host_name: T2486: replace disable-dhcp-nameservers with name-servers-dhcpJernej Jakob
The previous implementation only supported disabling DHCP nameservers for all interfaces, and was implemented improperly so it didn't work anyway. It's safe to remove it completely. This adds support for a new config node name-servers-dhcp <interface>, which allows us to enable just the interfaces we want to use for system DNS, identical in syntax to 'service dns forwarding dhcp <interface>'. The new option works by adding tags to vyos-hostsd that we want to use to add nameservers to resolv.conf, same as adding tags for dns forwarding but for a different destination file. A config migrator will be added in a separate commit.
2020-06-11host_name: T2486: remove domain-search length limitationsJernej Jakob
Debian Buster doesn't have the length and character limitations of /etc/resolv.conf 'search' any more, it is unlimited. https://sourceware.org/bugzilla/show_bug.cgi?id=19569 (glibc >2.26)
2020-06-11host_name: T2486: change internal 'static-host-mapping' representationJernej Jakob
Change internal representation to the one required by vyos-hostsd.
2020-05-29airbag: T2088: explicit enabling of the featureThomas Mangin
airbag must now be explicitly installed. the patch also allow to fully disables the installation of the logging code at setup (and not just installing and doing nothing)
2020-04-21dns-forwarding: T2298: verify pdns path is existsChristian Poessinger
2020-04-15dns-forwarding: T2298: remove wrongly added numberChristian Poessinger
Commit 16b2fc8 ("dns-forwarding: T2298: fix path to control file") added a wrong prefix to the line before executing 'systemctl restart snmpd.service'.
2020-04-15dns-forwarding: T2298: fix path to control fileChristian Poessinger
After migrating PowerDNS to systemd and also its configuration files to a volatile directory in commit 77d725f ("dns-forwarding: T2185: move configuration files to volatile /run directory") the path for the control file has not been altered and pushed to the client rec_control binary"
2020-04-13dns-forwarding: T2185: migrate from SysVinit to systemdChristian Poessinger
2020-04-09util: T2226: os.system was wrongly converted to runThomas Mangin
os.system does print the ouput of the command, run() does not. A new function called call() does the printing and return the error code.
2020-04-06util: T2226: rewrite system host-name to use cmdThomas Mangin
Previously any failure to set the hostname would have been ignored. Part of the convertion, if the change fail, the commit will fail too.
2019-11-17dns: T1786: add proper processing of 'system disable-dhcp-nameservers'zdc
2019-08-21T1598: redo host_name.py to use vyos-hostsd.Daniil Baturin
2019-08-13[hostname] T1531: Added hostname alias to 127.0.1.1 (Debian way)zsdc
This change makes "dnsdomainname" and "hostname -f" operable
2019-07-16T1531: do not include the domain name in system hostname.Daniil Baturin
2019-07-12Do not try to verify the hostname config if the script is run by cloud-init.Daniil Baturin
2019-07-09T1497: remove duplicate name servers and search domains obtained from DHCP.Daniil Baturin
2019-07-03T1497: make host_name.py wait for commit lock too.Daniil Baturin
2019-07-03T1497: remove the no longer necessary workaround for bad ↵Daniil Baturin
return_effective_values output.
2019-07-02T1497: "set system name-server" generates invalid/incorrect resolv.confUnicronNL
2019-06-20T1458: Regression in 1.2.1-S2 hostname & loggingKim Hagen
2019-06-18[ config ] T1447: Python subprocess called without import in host_name.pyKim Hagen
2019-06-17[syslog/hostname.py] T1394 - syslog systemd and host_name.py race conditionhagbard
- checking if the hostname has changed, otherwise the script and systemd try to restart rsyslogd at the same time, at the end it's not started at all.
2019-06-04T1379: Deprecated functions in /sbin/dhclient-scriptKim Hagen
2019-04-20[hostname] T1336: sanitize FQDN before passing to hostnamectlChristian Poessinger
Remove possible trialing (.) when invoking hostnamectl. A hostname with a trailing (.) is not supported in hostnamectl.
2019-04-05T1264 - host_name.py improvementshagbard
- checks if a variable exists to avoid setting None on defined defaults
2019-02-22feature: static-host-mapping - made IP address (param inet) mandatoryhagbard
2019-02-22removed a debugger print I forgut during mergehagbard
2019-02-22Fixes: T1262 - dhcp requested WAN ip address doesn't get search parameter in ↵hagbard
/etc/resolv.conf
2019-02-22pdns_recursor check improved, spits out a message for /var/run if it's not ↵hagbard
running.
2019-02-22bugfix: static-mapping-host alias not mandatory, verification adjustedhagbard
2019-02-21Fixes: T1257: implement 'set system static-host-mapping' in host_name.py and ↵hagbard
remove old function calls
2019-02-20T1255: read in modifications from third party scripts before altering /etc/hostsChristian Poessinger
E.g. DHCP server can update /etc/hosts with somw mappings - those mappings were lost on any subsequent invocation of host_name.py
2019-02-20T1255: add newlines for 3rd party script amendmentsChristian Poessinger
2019-02-17hostname: bugfix for overwriting search domainsChristian Poessinger
2019-02-16Add header to resolver configuration fileChristian Poessinger