1
0
mirror of https://github.com/systemd/systemd synced 2025-10-04 03:04:44 +02:00

Compare commits

...

11 Commits

Author SHA1 Message Date
Luca Boccassi
285b3d544f
basic: follow-ups for CHASE_MUST_BE_DIRECTORY/REGULAR (#38390)
Follow-up for 90b9f7a07e6f57825f416f6ce2db0a9f2086754b.
2025-07-28 23:16:53 +01:00
Luca Boccassi
d48a071f7a
Translations update from Fedora Weblate (#38387) 2025-07-28 23:12:54 +01:00
Jesse Guo
1f92fec2e9 po: Translated using Weblate (Chinese (Simplified) (zh_CN))
Currently translated at 100.0% (264 of 264 strings)

Co-authored-by: Jesse Guo <jesseguotech@outlook.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/zh_CN/
Translation: systemd/main
2025-07-28 21:33:09 +02:00
Andika Triwidada
217d5fed0d po: Translated using Weblate (Indonesian)
Currently translated at 100.0% (264 of 264 strings)

Co-authored-by: Andika Triwidada <andika@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/id/
Translation: systemd/main
2025-07-28 21:33:09 +02:00
naly zzwd
54a9066f1d po: Translated using Weblate (Catalan)
Currently translated at 100.0% (264 of 264 strings)

Co-authored-by: naly zzwd <xeanhort007@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/ca/
Translation: systemd/main
2025-07-28 21:33:09 +02:00
Brett Holman
04abe03189 man: correct the number of active unit states 2025-07-28 20:32:48 +01:00
Yu Watanabe
580643a47f conf-files: CHASE_MUST_BE_DIRECTORY can be set with CHASE_NONEXISTENT
With the previous commit, now CHASE_MUST_BE_DIRECTORY can be set with
CHASE_NONEXISTENT. Let's unconditionally set the flag to chase the
directory part of the conf file.
2025-07-29 03:40:34 +09:00
Yu Watanabe
1cabb6905b chase: check the result is a directory or regular file only when the resolved path exists
Otherwise, if it is called with CHASE_NONEXISTENT, when we call
stat_verify_directory()/_regular() the struct stat is for one of the
parent directory, rather than for the result path.

With this change, we can safely specify CHASE_MUST_BE_DIRECTORY/REGULAR
with CHASE_NONEXISTENT.

More importantly, chaseat() internally sets CHASE_MUST_BE_DIRECTORY when
the input path ends with "/", "/,", "/..". Hence, without this change,
we cannot specify CHASE_NONEXISTENT safely.

Follow-up for 90b9f7a07e6f57825f416f6ce2db0a9f2086754b.
2025-07-29 03:37:48 +09:00
Yu Watanabe
be876c5933 efi-api: cast before shift
Fixes the following error when running with sanitizers:
```
TEST-87-AUX-UTILS-VM.sh[670]: + bootctl install --make-entry-directory=yes
TEST-87-AUX-UTILS-VM.sh[695]: Copied "/usr/lib/systemd/boot/efi/systemd-bootx64.efi.signed" to "/boot/EFI/systemd/systemd-bootx64.efi".
TEST-87-AUX-UTILS-VM.sh[695]: Copied "/usr/lib/systemd/boot/efi/systemd-bootx64.efi.signed" to "/boot/EFI/BOOT/BOOTX64.EFI".
TEST-87-AUX-UTILS-VM.sh[695]: Created "/boot/fedora".
TEST-87-AUX-UTILS-VM.sh[695]: Random seed file /boot/loader/random-seed successfully refreshed (32 bytes).
TEST-87-AUX-UTILS-VM.sh[695]: ../src/shared/efi-api.c:618:38: runtime error: left shift of 243 by 24 places cannot be represented in type 'int'
```
2025-07-28 19:10:26 +01:00
Zbigniew Jędrzejewski-Szmek
9fa08842b7 shell-completion: drop deprecated systemd-efi-options from suggestions 2025-07-28 19:08:50 +01:00
Yu Watanabe
e43efecc8f TEST-23-UNIT-FILE: do not wait indefinitely but set a reasonable timeout
Otherwise, the test does not finish until the global timeout is reached.

This is for making the test fail earlier when something spurious happens:
```
[FAILED] Failed to start TEST-23-UNIT-FILE-short-lived.service - Shortlived Unit.
TEST-23-UNIT-FILE.sh[776]: + '[' 0 -eq 0 ']'
TEST-23-UNIT-FILE.sh[776]: + sleep .5
(snip)
58/98 systemd:integration-tests / TEST-23-UNIT-FILE  TIMEOUT  1800.52s  killed by signal 9 SIGKILL
```
2025-07-28 17:28:13 +01:00
10 changed files with 73 additions and 89 deletions

View File

@ -2575,9 +2575,9 @@ node /org/freedesktop/systemd1/unit/avahi_2ddaemon_2eservice {
<para><varname>SubState</varname> encodes states of the same state machine that <para><varname>SubState</varname> encodes states of the same state machine that
<varname>ActiveState</varname> covers, but knows more fine-grained states that are <varname>ActiveState</varname> covers, but knows more fine-grained states that are
unit-type-specific. Where <varname>ActiveState</varname> only covers six high-level states, unit-type-specific. Where <varname>ActiveState</varname> only covers eight high-level states,
<varname>SubState</varname> covers possibly many more low-level unit-type-specific states that are <varname>SubState</varname> covers possibly many more low-level unit-type-specific states that are
mapped to the six high-level states. Note that multiple low-level states might map to the same mapped to the eight high-level states. Note that multiple low-level states might map to the same
high-level state, but not vice versa. Not all high-level states have low-level counterparts on all unit high-level state, but not vice versa. Not all high-level states have low-level counterparts on all unit
types. At this point the low-level states are not documented here, and are more likely to be extended types. At this point the low-level states are not documented here, and are more likely to be extended
later on than the common high-level states explained above.</para> later on than the common high-level states explained above.</para>

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-07-23 15:38+0100\n" "POT-Creation-Date: 2025-07-23 15:38+0100\n"
"PO-Revision-Date: 2025-05-11 20:05+0000\n" "PO-Revision-Date: 2025-07-28 17:25+0000\n"
"Last-Translator: naly zzwd <xeanhort007@gmail.com>\n" "Last-Translator: naly zzwd <xeanhort007@gmail.com>\n"
"Language-Team: Catalan <https://translate.fedoraproject.org/projects/systemd/" "Language-Team: Catalan <https://translate.fedoraproject.org/projects/systemd/"
"main/ca/>\n" "main/ca/>\n"
@ -17,7 +17,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n" "Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 5.11.3\n" "X-Generator: Weblate 5.12.2\n"
#: src/core/org.freedesktop.systemd1.policy.in:22 #: src/core/org.freedesktop.systemd1.policy.in:22
msgid "Send passphrase back to system" msgid "Send passphrase back to system"
@ -154,15 +154,13 @@ msgstr "Cal autenticació per activar l'àrea d'inici d'un usuari."
#: src/home/org.freedesktop.home1.policy:93 #: src/home/org.freedesktop.home1.policy:93
msgid "Manage Home Directory Signing Keys" msgid "Manage Home Directory Signing Keys"
msgstr "" msgstr "Gestioneu les Claus de Signatura del Directori d'Inici"
#: src/home/org.freedesktop.home1.policy:94 #: src/home/org.freedesktop.home1.policy:94
#, fuzzy
#| msgid "Authentication is required to manage system services or other units."
msgid "Authentication is required to manage signing keys for home directories." msgid "Authentication is required to manage signing keys for home directories."
msgstr "" msgstr ""
"Es requereix autenticació per gestionar els serveis del sistema o bé altres " "Es requereix autenticació per gestionar les claus de signatura dels "
"unitats." "directoris d'inici."
#: src/home/pam_systemd_home.c:336 #: src/home/pam_systemd_home.c:336
#, c-format #, c-format
@ -928,19 +926,15 @@ msgstr ""
"Es requereix autenticació per crear una màquina virtual o contenidor local." "Es requereix autenticació per crear una màquina virtual o contenidor local."
#: src/machine/org.freedesktop.machine1.policy:106 #: src/machine/org.freedesktop.machine1.policy:106
#, fuzzy
#| msgid "Create a local virtual machine or container"
msgid "Register a local virtual machine or container" msgid "Register a local virtual machine or container"
msgstr "Crea una màquina virtual o contenidor local" msgstr "Registra una màquina virtual local o contenidor"
#: src/machine/org.freedesktop.machine1.policy:107 #: src/machine/org.freedesktop.machine1.policy:107
#, fuzzy
#| msgid ""
#| "Authentication is required to create a local virtual machine or container."
msgid "" msgid ""
"Authentication is required to register a local virtual machine or container." "Authentication is required to register a local virtual machine or container."
msgstr "" msgstr ""
"Es requereix autenticació per crear una màquina virtual o contenidor local." "Es requereix autenticació per registrar una màquina virtual local o "
"contenidor."
#: src/machine/org.freedesktop.machine1.policy:116 #: src/machine/org.freedesktop.machine1.policy:116
msgid "Manage local virtual machine and container images" msgid "Manage local virtual machine and container images"
@ -1174,14 +1168,11 @@ msgstr ""
#: src/resolve/org.freedesktop.resolve1.policy:154 #: src/resolve/org.freedesktop.resolve1.policy:154
msgid "Subscribe to DNS configuration" msgid "Subscribe to DNS configuration"
msgstr "" msgstr "Subscriu-te a la configuració de DNS"
#: src/resolve/org.freedesktop.resolve1.policy:155 #: src/resolve/org.freedesktop.resolve1.policy:155
#, fuzzy
#| msgid "Authentication is required to subscribe query results."
msgid "Authentication is required to subscribe to DNS configuration." msgid "Authentication is required to subscribe to DNS configuration."
msgstr "" msgstr "Es requereix autenticació per subscriure's a la configuració de DNS."
"Es requereix autenticació per subscriure's als resultats de la consulta."
#: src/resolve/org.freedesktop.resolve1.policy:165 #: src/resolve/org.freedesktop.resolve1.policy:165
msgid "Dump cache" msgid "Dump cache"
@ -1329,16 +1320,12 @@ msgstr ""
"'$(unit)'." "'$(unit)'."
#: src/core/dbus-unit.c:620 #: src/core/dbus-unit.c:620
#, fuzzy
#| msgid ""
#| "Authentication is required to send a UNIX signal to the processes of "
#| "'$(unit)'."
msgid "" msgid ""
"Authentication is required to send a UNIX signal to the processes of " "Authentication is required to send a UNIX signal to the processes of "
"subgroup of '$(unit)'." "subgroup of '$(unit)'."
msgstr "" msgstr ""
"Es requereix autenticació per enviar un senyal UNIX als processos de " "Es requereix autenticació per enviar un senyal UNIX als processos del "
"'$(unit)'." "subgrup de '$(unit)'."
#: src/core/dbus-unit.c:648 #: src/core/dbus-unit.c:648
msgid "Authentication is required to reset the \"failed\" state of '$(unit)'." msgid "Authentication is required to reset the \"failed\" state of '$(unit)'."

View File

@ -1,12 +1,12 @@
# SPDX-License-Identifier: LGPL-2.1-or-later # SPDX-License-Identifier: LGPL-2.1-or-later
# #
# Indonesian translation for systemd. # Indonesian translation for systemd.
# Andika Triwidada <andika@gmail.com>, 2014, 2021, 2022, 2024. # Andika Triwidada <andika@gmail.com>, 2014, 2021, 2022, 2024, 2025.
msgid "" msgid ""
msgstr "" msgstr ""
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-07-23 15:38+0100\n" "POT-Creation-Date: 2025-07-23 15:38+0100\n"
"PO-Revision-Date: 2024-11-29 12:38+0000\n" "PO-Revision-Date: 2025-07-28 17:25+0000\n"
"Last-Translator: Andika Triwidada <andika@gmail.com>\n" "Last-Translator: Andika Triwidada <andika@gmail.com>\n"
"Language-Team: Indonesian <https://translate.fedoraproject.org/projects/" "Language-Team: Indonesian <https://translate.fedoraproject.org/projects/"
"systemd/main/id/>\n" "systemd/main/id/>\n"
@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n" "Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Weblate 5.8.2\n" "X-Generator: Weblate 5.12.2\n"
#: src/core/org.freedesktop.systemd1.policy.in:22 #: src/core/org.freedesktop.systemd1.policy.in:22
msgid "Send passphrase back to system" msgid "Send passphrase back to system"
@ -148,14 +148,13 @@ msgstr "Otentikasi diperlukan untuk mengaktifkan suatu area home pengguna."
#: src/home/org.freedesktop.home1.policy:93 #: src/home/org.freedesktop.home1.policy:93
msgid "Manage Home Directory Signing Keys" msgid "Manage Home Directory Signing Keys"
msgstr "" msgstr "Kelola Kunci Penandatanganan Direktori Home"
#: src/home/org.freedesktop.home1.policy:94 #: src/home/org.freedesktop.home1.policy:94
#, fuzzy
#| msgid "Authentication is required to manage system services or other units."
msgid "Authentication is required to manage signing keys for home directories." msgid "Authentication is required to manage signing keys for home directories."
msgstr "" msgstr ""
"Otentikasi diperlukan untuk mengelola layanan sistem atau unit lainnya." "Otentikasi diperlukan untuk mengelola kunci penandatanganan bagi direktori "
"home."
#: src/home/pam_systemd_home.c:336 #: src/home/pam_systemd_home.c:336
#, c-format #, c-format
@ -882,19 +881,14 @@ msgstr ""
"kontainer." "kontainer."
#: src/machine/org.freedesktop.machine1.policy:106 #: src/machine/org.freedesktop.machine1.policy:106
#, fuzzy
#| msgid "Create a local virtual machine or container"
msgid "Register a local virtual machine or container" msgid "Register a local virtual machine or container"
msgstr "Membuat suatu mesin virtual lokal atau kontainer" msgstr "Daftarkan suatu mesin virtual lokal atau kontainer"
#: src/machine/org.freedesktop.machine1.policy:107 #: src/machine/org.freedesktop.machine1.policy:107
#, fuzzy
#| msgid ""
#| "Authentication is required to create a local virtual machine or container."
msgid "" msgid ""
"Authentication is required to register a local virtual machine or container." "Authentication is required to register a local virtual machine or container."
msgstr "" msgstr ""
"Otentikasi diperlukan untuk membuat sebuah mesin virtual lokal atau " "Otentikasi diperlukan untuk mendaftarkan sebuah mesin virtual lokal atau "
"kontainer." "kontainer."
#: src/machine/org.freedesktop.machine1.policy:116 #: src/machine/org.freedesktop.machine1.policy:116
@ -1123,13 +1117,11 @@ msgstr "Otentikasi diperlukan untuk berlangganan hasil kuiri."
#: src/resolve/org.freedesktop.resolve1.policy:154 #: src/resolve/org.freedesktop.resolve1.policy:154
msgid "Subscribe to DNS configuration" msgid "Subscribe to DNS configuration"
msgstr "" msgstr "Berlangganan ke konfigurasi DNS"
#: src/resolve/org.freedesktop.resolve1.policy:155 #: src/resolve/org.freedesktop.resolve1.policy:155
#, fuzzy
#| msgid "Authentication is required to subscribe query results."
msgid "Authentication is required to subscribe to DNS configuration." msgid "Authentication is required to subscribe to DNS configuration."
msgstr "Otentikasi diperlukan untuk berlangganan hasil kuiri." msgstr "Otentikasi diperlukan untuk berlangganan ke konfigurasi DNS."
#: src/resolve/org.freedesktop.resolve1.policy:165 #: src/resolve/org.freedesktop.resolve1.policy:165
msgid "Dump cache" msgid "Dump cache"
@ -1272,16 +1264,12 @@ msgstr ""
"'$(unit)'." "'$(unit)'."
#: src/core/dbus-unit.c:620 #: src/core/dbus-unit.c:620
#, fuzzy
#| msgid ""
#| "Authentication is required to send a UNIX signal to the processes of "
#| "'$(unit)'."
msgid "" msgid ""
"Authentication is required to send a UNIX signal to the processes of " "Authentication is required to send a UNIX signal to the processes of "
"subgroup of '$(unit)'." "subgroup of '$(unit)'."
msgstr "" msgstr ""
"Otentikasi diperlukan untuk megirim suatu sinyal UNIX ke proses dari " "Otentikasi diperlukan untuk megirim suatu sinyal UNIX ke proses dari sub "
"'$(unit)'." "grup '$(unit)'."
#: src/core/dbus-unit.c:648 #: src/core/dbus-unit.c:648
msgid "Authentication is required to reset the \"failed\" state of '$(unit)'." msgid "Authentication is required to reset the \"failed\" state of '$(unit)'."

View File

@ -15,7 +15,7 @@ msgid ""
msgstr "" msgstr ""
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-07-23 15:38+0100\n" "POT-Creation-Date: 2025-07-23 15:38+0100\n"
"PO-Revision-Date: 2025-07-27 09:55+0000\n" "PO-Revision-Date: 2025-07-28 17:25+0000\n"
"Last-Translator: Jesse Guo <jesseguotech@outlook.com>\n" "Last-Translator: Jesse Guo <jesseguotech@outlook.com>\n"
"Language-Team: Chinese (Simplified) <https://translate.fedoraproject.org/" "Language-Team: Chinese (Simplified) <https://translate.fedoraproject.org/"
"projects/systemd/main/zh_CN/>\n" "projects/systemd/main/zh_CN/>\n"
@ -101,7 +101,7 @@ msgstr "核验家区域的凭证"
#: src/home/org.freedesktop.home1.policy:34 #: src/home/org.freedesktop.home1.policy:34
msgid "" msgid ""
"Authentication is required to check credentials against a user's home area." "Authentication is required to check credentials against a user's home area."
msgstr "将凭据与用户家区域进行核验需要认证。" msgstr "依据用户的家区域核验凭证需要认证。"
#: src/home/org.freedesktop.home1.policy:43 #: src/home/org.freedesktop.home1.policy:43
msgid "Update a home area" msgid "Update a home area"
@ -331,7 +331,7 @@ msgstr "设置静态主机名"
msgid "" msgid ""
"Authentication is required to set the statically configured local hostname, " "Authentication is required to set the statically configured local hostname, "
"as well as the pretty hostname." "as well as the pretty hostname."
msgstr "设静态本地主机名或美观主机名需要认证。" msgstr "设静态本地主机名或美观主机名需要认证。"
#: src/hostname/org.freedesktop.hostname1.policy:41 #: src/hostname/org.freedesktop.hostname1.policy:41
msgid "Set machine information" msgid "Set machine information"
@ -367,7 +367,7 @@ msgstr "获得系统描述需要认证。"
#: src/import/org.freedesktop.import1.policy:22 #: src/import/org.freedesktop.import1.policy:22
msgid "Import a disk image" msgid "Import a disk image"
msgstr "导入虚拟机或容器镜像" msgstr "导入磁盘镜像"
#: src/import/org.freedesktop.import1.policy:23 #: src/import/org.freedesktop.import1.policy:23
msgid "Authentication is required to import an image." msgid "Authentication is required to import an image."
@ -375,7 +375,7 @@ msgstr "导入镜像需要认证。"
#: src/import/org.freedesktop.import1.policy:32 #: src/import/org.freedesktop.import1.policy:32
msgid "Export a disk image" msgid "Export a disk image"
msgstr "导出一个磁盘映像" msgstr "导出磁盘镜像"
#: src/import/org.freedesktop.import1.policy:33 #: src/import/org.freedesktop.import1.policy:33
msgid "Authentication is required to export disk image." msgid "Authentication is required to export disk image."
@ -391,7 +391,7 @@ msgstr "下载磁盘镜像需要认证。"
#: src/import/org.freedesktop.import1.policy:52 #: src/import/org.freedesktop.import1.policy:52
msgid "Cancel transfer of a disk image" msgid "Cancel transfer of a disk image"
msgstr "取消磁盘像的传输" msgstr "取消磁盘像的传输"
#: src/import/org.freedesktop.import1.policy:53 #: src/import/org.freedesktop.import1.policy:53
msgid "" msgid ""
@ -408,11 +408,11 @@ msgstr "设置系统区域和语言需要认证。"
#: src/locale/org.freedesktop.locale1.policy:33 #: src/locale/org.freedesktop.locale1.policy:33
msgid "Set system keyboard settings" msgid "Set system keyboard settings"
msgstr "设置系统键盘" msgstr "设置系统键盘设置"
#: src/locale/org.freedesktop.locale1.policy:34 #: src/locale/org.freedesktop.locale1.policy:34
msgid "Authentication is required to set the system keyboard settings." msgid "Authentication is required to set the system keyboard settings."
msgstr "设置系统键盘需要认证。" msgstr "设置系统键盘设置需要认证。"
#: src/login/org.freedesktop.login1.policy:22 #: src/login/org.freedesktop.login1.policy:22
msgid "Allow applications to inhibit system shutdown" msgid "Allow applications to inhibit system shutdown"
@ -479,13 +479,13 @@ msgstr "允许应用程序阻止系统响应挂起键需要认证。"
#: src/login/org.freedesktop.login1.policy:97 #: src/login/org.freedesktop.login1.policy:97
msgid "Allow applications to inhibit system handling of the hibernate key" msgid "Allow applications to inhibit system handling of the hibernate key"
msgstr "允许应用程序阻止系统响应挂起键" msgstr "允许应用程序阻止系统响应休眠键"
#: src/login/org.freedesktop.login1.policy:98 #: src/login/org.freedesktop.login1.policy:98
msgid "" msgid ""
"Authentication is required for an application to inhibit system handling of " "Authentication is required for an application to inhibit system handling of "
"the hibernate key." "the hibernate key."
msgstr "允许应用程序阻止系统响应挂起键需要认证。" msgstr "允许应用程序阻止系统响应休眠键需要认证。"
#: src/login/org.freedesktop.login1.policy:107 #: src/login/org.freedesktop.login1.policy:107
msgid "Allow applications to inhibit system handling of the lid switch" msgid "Allow applications to inhibit system handling of the lid switch"
@ -525,14 +525,14 @@ msgstr "允许未登录用户运行程序需要认证。"
#: src/login/org.freedesktop.login1.policy:148 #: src/login/org.freedesktop.login1.policy:148
msgid "Allow attaching devices to seats" msgid "Allow attaching devices to seats"
msgstr "允许将设备附加至会话座位" msgstr "允许将设备附加至位"
# Pay attention to the concept of "seat". # Pay attention to the concept of "seat".
# #
# To fully understand the meaning, please refer to session management in old ConsoleKit and new systemd-logind. # To fully understand the meaning, please refer to session management in old ConsoleKit and new systemd-logind.
#: src/login/org.freedesktop.login1.policy:149 #: src/login/org.freedesktop.login1.policy:149
msgid "Authentication is required to attach a device to a seat." msgid "Authentication is required to attach a device to a seat."
msgstr "允许将设备附加至某个会话座位需要认证。" msgstr "将设备附加至席位需要认证。"
#: src/login/org.freedesktop.login1.policy:159 #: src/login/org.freedesktop.login1.policy:159
msgid "Flush device to seat attachments" msgid "Flush device to seat attachments"

View File

@ -70,8 +70,7 @@ _bootctl() {
fi fi
local -A VERBS=( local -A VERBS=(
# systemd-efi-options takes an argument, but it is free-form, so we cannot complete it [STANDALONE]='help status install update remove is-installed random-seed list set-timeout set-timeout-oneshot cleanup'
[STANDALONE]='help status install update remove is-installed random-seed systemd-efi-options list set-timeout set-timeout-oneshot cleanup'
[BOOTENTRY]='set-default set-oneshot unlink' [BOOTENTRY]='set-default set-oneshot unlink'
[BOOLEAN]='reboot-to-firmware' [BOOLEAN]='reboot-to-firmware'
[FILE]='kernel-identify kernel-inspect' [FILE]='kernel-identify kernel-inspect'

View File

@ -45,7 +45,6 @@ _bootctl_reboot-to-firmware() {
"remove:Remove systemd-boot from the ESP and EFI variables" "remove:Remove systemd-boot from the ESP and EFI variables"
"is-installed:Test whether systemd-boot is installed in the ESP" "is-installed:Test whether systemd-boot is installed in the ESP"
"random-seed:Initialize random seed in ESP and EFI variables" "random-seed:Initialize random seed in ESP and EFI variables"
"systemd-efi-options:Query or set system options string in EFI variable"
"reboot-to-firmware:Query or set reboot-to-firmware EFI flag" "reboot-to-firmware:Query or set reboot-to-firmware EFI flag"
"list:List boot loader entries" "list:List boot loader entries"
"set-default:Set the default boot loader entry" "set-default:Set the default boot loader entry"

View File

@ -509,16 +509,18 @@ int chaseat(int dir_fd, const char *path, ChaseFlags flags, char **ret_path, int
close_and_replace(fd, child); close_and_replace(fd, child);
} }
if (FLAGS_SET(flags, CHASE_MUST_BE_DIRECTORY)) { if (exists) {
r = stat_verify_directory(&st); if (FLAGS_SET(flags, CHASE_MUST_BE_DIRECTORY)) {
if (r < 0) r = stat_verify_directory(&st);
return r; if (r < 0)
} return r;
}
if (FLAGS_SET(flags, CHASE_MUST_BE_REGULAR)) { if (FLAGS_SET(flags, CHASE_MUST_BE_REGULAR)) {
r = stat_verify_regular(&st); r = stat_verify_regular(&st);
if (r < 0) if (r < 0)
return r; return r;
}
} }
if (ret_path) { if (ret_path) {

View File

@ -145,7 +145,9 @@ int conf_file_new_at(const char *path, int rfd, ChaseFlags chase_flags, ConfFile
return log_debug_errno(r, "Failed to extract directory from '%s': %m", path); return log_debug_errno(r, "Failed to extract directory from '%s': %m", path);
if (r >= 0) { if (r >= 0) {
r = chaseat(rfd, dirpath, r = chaseat(rfd, dirpath,
CHASE_AT_RESOLVE_IN_ROOT | (FLAGS_SET(chase_flags, CHASE_NONEXISTENT) ? CHASE_NONEXISTENT : CHASE_MUST_BE_DIRECTORY), CHASE_AT_RESOLVE_IN_ROOT |
CHASE_MUST_BE_DIRECTORY |
(FLAGS_SET(chase_flags, CHASE_NONEXISTENT) ? CHASE_NONEXISTENT : 0),
&resolved_dirpath, /* ret_fd = */ NULL); &resolved_dirpath, /* ret_fd = */ NULL);
if (r < 0) if (r < 0)
return log_debug_errno(r, "Failed to chase '%s%s': %m", empty_to_root(root), skip_leading_slash(dirpath)); return log_debug_errno(r, "Failed to chase '%s%s': %m", empty_to_root(root), skip_leading_slash(dirpath));

View File

@ -615,9 +615,9 @@ void efi_id128_to_guid(sd_id128_t id, void *ret_guid) {
assert(ret_guid); assert(ret_guid);
EFI_GUID uuid = { EFI_GUID uuid = {
.Data1 = id.bytes[0] << 24 | id.bytes[1] << 16 | id.bytes[2] << 8 | id.bytes[3], .Data1 = (uint32_t) id.bytes[0] << 24 | (uint32_t) id.bytes[1] << 16 | (uint32_t) id.bytes[2] << 8 | id.bytes[3],
.Data2 = id.bytes[4] << 8 | id.bytes[5], .Data2 = (uint16_t) id.bytes[4] << 8 | id.bytes[5],
.Data3 = id.bytes[6] << 8 | id.bytes[7], .Data3 = (uint16_t) id.bytes[6] << 8 | id.bytes[7],
}; };
memcpy(uuid.Data4, id.bytes+8, sizeof(uuid.Data4)); memcpy(uuid.Data4, id.bytes+8, sizeof(uuid.Data4));
memcpy(ret_guid, &uuid, sizeof(uuid)); memcpy(ret_guid, &uuid, sizeof(uuid));

View File

@ -24,9 +24,13 @@ trap -p SIGUSR1
systemctl start TEST-23-UNIT-FILE-success.service systemctl start TEST-23-UNIT-FILE-success.service
while [ "$sigusr1" -eq 0 ] ; do for _ in {1..120}; do
sleep .5 sleep .5
if [[ "$sigusr1" == 1 ]]; then
break
fi
done done
[[ "$sigusr1" == 1 ]]
systemctl stop TEST-23-UNIT-FILE-uphold.service systemctl stop TEST-23-UNIT-FILE-uphold.service
@ -46,17 +50,13 @@ rm -f /tmp/TEST-23-UNIT-FILE-retry-fail
systemctl start TEST-23-UNIT-FILE-retry-uphold.service systemctl start TEST-23-UNIT-FILE-retry-uphold.service
systemctl is-active TEST-23-UNIT-FILE-upheldby-install.service systemctl is-active TEST-23-UNIT-FILE-upheldby-install.service
until systemctl is-failed TEST-23-UNIT-FILE-retry-fail.service ; do timeout 60 bash -c 'until systemctl is-failed TEST-23-UNIT-FILE-retry-fail.service; do sleep .5; done'
sleep .5
done
(! systemctl is-active TEST-23-UNIT-FILE-retry-upheld.service) (! systemctl is-active TEST-23-UNIT-FILE-retry-upheld.service)
touch /tmp/TEST-23-UNIT-FILE-retry-fail touch /tmp/TEST-23-UNIT-FILE-retry-fail
until systemctl is-active TEST-23-UNIT-FILE-retry-upheld.service ; do timeout 60 bash -c 'until systemctl is-active TEST-23-UNIT-FILE-retry-upheld.service; do sleep .5; done'
sleep .5
done
systemctl stop TEST-23-UNIT-FILE-retry-uphold.service TEST-23-UNIT-FILE-retry-fail.service TEST-23-UNIT-FILE-retry-upheld.service systemctl stop TEST-23-UNIT-FILE-retry-uphold.service TEST-23-UNIT-FILE-retry-fail.service TEST-23-UNIT-FILE-retry-upheld.service
@ -74,10 +74,13 @@ trap sigusr2=1 SIGUSR2
systemctl start TEST-23-UNIT-FILE-prop-stop-one.service systemctl start TEST-23-UNIT-FILE-prop-stop-one.service
while [ "$sigusr2" -eq 0 ] ; do for _ in {1..120}; do
sleep .5 sleep .5
if [[ "$sigusr2" == 1 ]]; then
break
fi
done done
[[ "$sigusr2" == 1 ]]
# Idea is this: # Idea is this:
# 1. we start TEST-23-UNIT-FILE-binds-to.service # 1. we start TEST-23-UNIT-FILE-binds-to.service
@ -92,8 +95,12 @@ trap sigrtmin1=1 SIGRTMIN+1
systemctl start TEST-23-UNIT-FILE-binds-to.service systemctl start TEST-23-UNIT-FILE-binds-to.service
while [ "$sigrtmin1" -eq 0 ] ; do for _ in {1..120}; do
sleep .5 sleep .5
if [[ "$sigrtmin1" == 1 ]]; then
break
fi
done done
[[ "$sigrtmin1" == 1 ]]
systemd-analyze log-level info systemd-analyze log-level info