summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* systemctl: add support for booting into boot menu/entryLennart Poettering2019-03-052-17/+160
| | | | | | | | (This also removes support for booting into the EFI firmware setup without logind. That's because otherwise the non-EFI fallback logind implements can't work.) Fixes: #9896
* logind: add support for booting into the boot menu or a specific boot menu entryLennart Poettering2019-03-054-2/+501
| | | | | | This behaves similar to the "boot into firmware" logic, and also allows either direct EFI operation (which sd-boot supports and others might support eventually too) or override through env var.
* bootspec: validate bootpsec entry ids before we use themLennart Poettering2019-03-051-1/+7
|
* bootspec: get rid of find_default_boot_entry() entirelyLennart Poettering2019-03-053-26/+15
| | | | | | Now only two operations are left. Let's just move this into the caller, since it should make things simpler, clearer and shorter, in particular as there's only a single user for this.
* bootspec: rework find_default_boot_entry() to use ↵Lennart Poettering2019-03-051-13/+2
| | | | | | boot_entries_load_config_auto() it's pretty much the same code now, hence use it.
* bootspec: introduce new helper boot_entries_load_config_auto()Lennart Poettering2019-03-052-0/+49
| | | | | | | | It's a simple wrapper around boot_entries_load_config(), but determines the ESP/XBOOTLDR paths automatically at first. Also, it looks for a path /run/boot-loader-entries/ and loads the entries from there if it exists. This is supposed to be a hook for other boot loaders to make our tools aware of their own entries.
* bootspec: correct error code shown in log msgLennart Poettering2019-03-051-1/+1
|
* bootspec: move augmentation of loader-discovered entries into bootspec.cLennart Poettering2019-03-053-19/+110
| | | | | | | | | Previously, bootctl would show boot loader entries discovered by the boot loader which couldn't found locally separately in the output. Let's move this code into bootspec.c, and beef it up a bit. This way we can use it later on for logind, and correctly show automatically discovered windows/macos entries too.
* bootspec: simplify find_default_boot_entry()Lennart Poettering2019-03-053-6/+4
| | | | | If the only caller passes NULL for the two paths, let's remove the parameter altogether.
* systemctl: let's FORK_WAIT where we canLennart Poettering2019-03-051-8/+3
|
* systemctl: when something is not supported use EOPNOTSUPPLennart Poettering2019-03-051-2/+2
|
* systemctl: be careful with boot loader entries lacking a 'linux' lineLennart Poettering2019-03-051-0/+3
| | | | | A boot loader entry might not have a 'linux' line, but an 'efi' line or something else. Let's handle that case nicely.
* bootspec: move log msg from systemctl.c to bootspec.cLennart Poettering2019-03-052-4/+3
| | | | | | find_default_boot_entry() is only used by systemctl.c, and currently handles one log message in the caller instead of the callee. Let's simplify that and move it over, too
* bootctl: tweak 'list' output a bitLennart Poettering2019-03-051-2/+3
| | | | | Let's suppress the final newline in the list if it's the last entry we are outputting.
* logind: optionally support non-EFI reboot-to-firmwareLennart Poettering2019-03-051-15/+82
| | | | | | | | | | | | | | This extends the reboot-to-firmware logic in logind, so that other than EFI firmwares could be theoretically support. The scheme is like this: if you want to support this, set the $SYSTEMD_REBOOT_TO_FIRMWARE=1 env var for logind. If so, this will override the EFI logic, and cause a file /run/systemd/reboot-to-firmware file to be created when reboot-to-firmware is requested. This file has no contents, it's mere existance indicates a reboot with reboot-to-firmware set. The idea is that for alternative firmwares a drop-in for logind is added that sets the env var, in combination with some code run during shutdown that checks for the file and does the right thing.
* efivars: extend character set that may be used in boot loader entry ids a bitLennart Poettering2019-03-051-1/+1
| | | | See https://github.com/systemd/systemd/pull/10495#discussion_r233992570
* Merge pull request #11896 from poettering/shutdown-fixesZbigniew Jędrzejewski-Szmek2019-03-058-23/+25
|\ | | | | move src/core/shutdown.c and helpers to src/shutdown/
| * shutdown: rearrange shutdown sources in source treeLennart Poettering2019-03-057-12/+13
| | | | | | | | | | | | | | | | | | | | Let's move the shutdown binary into its own subdirectory in src/shutdown, after all it is relatively isolated from the normal PID 1 sources, being a different binary and all. Unfortunately it's not possible to move some of the code, since it is shared with PID 1, that I wished we could move, but I still think it's worth it.
| * shutdown: (void)ify more stuffLennart Poettering2019-03-051-3/+3
| |
| * shutdown: fix up return type of sync_making_progress()Lennart Poettering2019-03-051-7/+5
| | | | | | | | | | We shouldn't return negative errnos as "bool", hence fix the type of the function to "int".
| * update TODOLennart Poettering2019-03-051-1/+4
| |
* | docs: add a note about compilation optionsZbigniew Jędrzejewski-Szmek2019-03-051-0/+14
| | | | | | | | Closes #6371.
* | core: warn if people use the undocumented/depreacted ConditionNull=Lennart Poettering2019-03-051-0/+2
| | | | | | | | | | | | Triggered by: https://github.com/systemd/systemd/issues/11812
* | udev: restore debug level when logging a failure in the external prog called ↵Franck Bui2019-03-051-1/+1
|/ | | | | | | | | | by IMPORT{program} It was already the case before commit a75211421fc9366068e6d9446e8e567246c72feb, which upgraded the log to warning. This seems an unintended side effect as the commit message doesn't mention it and the old behavior looks more appropriate.
* Merge pull request #11881 from yuwata/networkd-vs-interface-renamingLennart Poettering2019-03-057-34/+90
|\ | | | | Networkd vs interface renaming
| * dhcp: refuse to configure DHCP IAID if the interface is under renamingYu Watanabe2019-03-051-0/+8
| | | | | | | | | | | | systemd-networkd itself does not start dhcp client, but the code may be used in other projects. So, check that the interface is under renaming or not.
| * network: do not configure interfaces under renamingYu Watanabe2019-03-052-1/+23
| |
| * util: introduce device_is_renaming()Yu Watanabe2019-03-052-0/+13
| | | | | | | | It will be used in the later commit.
| * network: always drop configs when interface is renamedYu Watanabe2019-03-051-12/+6
| | | | | | | | | | Before the renaming, wrong .network file may be assigned to the link. So, let's always drop link configuration.
| * udev: set ID_RENAMING property when interface renaming is requestedYu Watanabe2019-03-051-17/+30
| | | | | | | | And drop the property on the corresponding 'move' uevent.
| * udev: do not read UdevEvent object before checking it is non-NULLYu Watanabe2019-03-051-1/+3
| |
| * udev: drop unnecessary copy of new interface nameYu Watanabe2019-03-051-6/+7
| |
| * netlink: check new interface name is valid or not before sending requestYu Watanabe2019-03-051-0/+3
| |
* | udev: run programs in the specified orderYu Watanabe2019-03-056-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | This fixes bugs introduced by 29448498c724da7ade1b5efb20d7472c1b128d2c and d838e14515c82b05a07f2bf393cce057b45b2b53. Previously, RUN and SECLABEL keys are stored in udev_list with its unique flag is false. If the flag is false, then udev_list is just a linked list and new entries are always added in the last. So, we should use OrderedHashmap instead of Hashmap. Fixes #11368.
* | hwdb: add touchpad resolutions for 2015-2017 MacBook(Pro)'s. (#11874)roadrunner22019-03-051-0/+26
| | | | | | | | These are all models using an SPI keyboard and touchpad and using the same applespi kernel driver.
* | travis: use /bin/systemd instead of /usr/bin/systemdEvgeny Vereshchagin2019-03-051-1/+1
|/ | | | Apparently systemd is in /bin now.
* Merge pull request #11841 from keszybz/dns-packet-speedupLennart Poettering2019-03-047-46/+77
|\ | | | | DNS packet speedup
| * fuzz-dns-packet: add test case with lots of labelsZbigniew Jędrzejewski-Szmek2019-03-041-0/+0
| | | | | | | | https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=13422
| * resolved: when adding RR to an answer, avoid comparing keys twiceZbigniew Jędrzejewski-Szmek2019-03-042-28/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We'd call dns_resource_record_equal(), which calls dns_resource_key_equal() internally, and then dns_resource_key_equal() a second time. Let's be a bit smarter, and call dns_resource_key_equal() only once. (before) dns_resource_key_hash_func_count=514 dns_resource_key_compare_func_count=275 dns_resource_key_equal_count=62371 4.13s user 0.01s system 99% cpu 4.153 total (after) dns_resource_key_hash_func_count=514 dns_resource_key_compare_func_count=276 dns_resource_key_equal_count=31337 2.13s user 0.01s system 99% cpu 2.139 total
| * resolve: split the RR comparison function in twoZbigniew Jędrzejewski-Szmek2019-03-042-10/+20
| | | | | | | | No functional change.
| * resolved: use a temporary Set to speed up dns question parsingZbigniew Jędrzejewski-Szmek2019-03-043-8/+36
| | | | | | | | | | | | This doesn't necessarily make things faster, because we still spend more time in dns_answer_add(), but it improves the compuational complexity of this part. If we even make dns_resource_key_equal_faster, this will become worthwhile.
* | Merge pull request #11871 from yuwata/systemctl-show-format-unprintableLennart Poettering2019-03-049-105/+476
|\ \ | | | | | | systemctl: format many entries in 'show' command
| * | systemctl: format LogExtraFields= in 'show' commandYu Watanabe2019-03-041-0/+50
| | |
| * | systemctl: format BindPaths= or TemporaryFileSystems= in 'show' commandYu Watanabe2019-03-041-0/+72
| | |
| * | systemctl: print RestrictAddressFamilies= in 'show' commandYu Watanabe2019-03-041-1/+2
| | |
| * | systemctl: show nothing if no LoadError=Yu Watanabe2019-03-041-1/+3
| | |
| * | systemctl: format IPIngressBytes= or friends nicelyYu Watanabe2019-03-041-0/+2
| | |
| * | systemctl: show IPAddressAllow= and IPAddressDeny= in 'show' commandYu Watanabe2019-03-041-0/+62
| | |
| * | test: add tests for test_in_addr_prefix_to_string()Yu Watanabe2019-03-041-0/+49
| | |
| * | test: move tests for in_addr_prefix_from_string()Yu Watanabe2019-03-041-27/+30
| | |