mirror of
https://github.com/systemd/systemd
synced 2025-09-29 00:34:45 +02:00
Compare commits
5 Commits
e3b1743596
...
cb90434c2a
Author | SHA1 | Date | |
---|---|---|---|
![]() |
cb90434c2a | ||
![]() |
559da4a509 | ||
![]() |
aa089759ad | ||
![]() |
5a70aa5315 | ||
![]() |
992716c9ab |
@ -504,7 +504,7 @@
|
|||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>--all-architectures</option></term>
|
<term><option>--all-architectures</option></term>
|
||||||
<listitem><para>Install binaries for all supported EFI architectures (this implies <option>--no-variables</option>).</para>
|
<listitem><para>Install binaries for all supported EFI architectures (this implies <option>--variables=no</option>).</para>
|
||||||
|
|
||||||
<xi:include href="version-info.xml" xpointer="v252"/></listitem>
|
<xi:include href="version-info.xml" xpointer="v252"/></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
@ -32,13 +32,20 @@ _bootctl() {
|
|||||||
local i verb comps
|
local i verb comps
|
||||||
local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}
|
local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}
|
||||||
local -A OPTS=(
|
local -A OPTS=(
|
||||||
[STANDALONE]='-h --help -p --print-esp-path -x --print-boot-path --version --no-variables --no-pager --graceful --dry-run'
|
[STANDALONE]='-h --help --version
|
||||||
[ARG]='--esp-path --boot-path --make-machine-id-directory --root --image --install-source --random-seed'
|
-p --print-esp-path -x --print-boot-path --print-loader-path
|
||||||
|
--print-stub-path -R --print-root-device -RR
|
||||||
|
--no-pager --graceful -q --quiet --all-architectures
|
||||||
|
--dry-run'
|
||||||
|
[ARG]='--esp-path --boot-path --root --image --image-policy --install-source
|
||||||
|
--variables --random-seed --make-entry-directory --entry-token --json
|
||||||
|
--efi-boot-option-description --secure-boot-auto-enroll --private-key
|
||||||
|
--private-key-source --certificate --certificate-source'
|
||||||
)
|
)
|
||||||
|
|
||||||
if __contains_word "$prev" ${OPTS[ARG]}; then
|
if __contains_word "$prev" ${OPTS[ARG]}; then
|
||||||
case $prev in
|
case $prev in
|
||||||
--esp-path|--boot-path)
|
--esp-path|--boot-path|--private-key|--certificate)
|
||||||
if [[ -z $cur ]]; then
|
if [[ -z $cur ]]; then
|
||||||
comps=$(compgen -A directory -- "/" )
|
comps=$(compgen -A directory -- "/" )
|
||||||
else
|
else
|
||||||
@ -46,9 +53,12 @@ _bootctl() {
|
|||||||
fi
|
fi
|
||||||
compopt -o filenames
|
compopt -o filenames
|
||||||
;;
|
;;
|
||||||
--make-machine-id-directory)
|
--make-entry-directory)
|
||||||
comps="yes no auto"
|
comps="yes no auto"
|
||||||
;;
|
;;
|
||||||
|
--entry-token)
|
||||||
|
comps="machine-id os-id os-image-id auto literal:"
|
||||||
|
;;
|
||||||
--image|--root)
|
--image|--root)
|
||||||
compopt -o nospace
|
compopt -o nospace
|
||||||
comps=$( compgen -A file -- "$cur" )
|
comps=$( compgen -A file -- "$cur" )
|
||||||
@ -56,9 +66,12 @@ _bootctl() {
|
|||||||
--install-source)
|
--install-source)
|
||||||
comps="image host auto"
|
comps="image host auto"
|
||||||
;;
|
;;
|
||||||
--random-seed)
|
--random-seed|--variables|--secure-boot-auto-enroll)
|
||||||
comps="yes no"
|
comps="yes no"
|
||||||
;;
|
;;
|
||||||
|
--json)
|
||||||
|
comps=$( bootctl --json=help 2>/dev/null )
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
COMPREPLY=( $(compgen -W '$comps' -- "$cur") )
|
COMPREPLY=( $(compgen -W '$comps' -- "$cur") )
|
||||||
return 0
|
return 0
|
||||||
@ -71,7 +84,7 @@ _bootctl() {
|
|||||||
|
|
||||||
local -A VERBS=(
|
local -A VERBS=(
|
||||||
[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 list set-timeout set-timeout-oneshot cleanup'
|
||||||
[BOOTENTRY]='set-default set-oneshot unlink'
|
[BOOTENTRY]='set-default set-oneshot set-sysfail unlink'
|
||||||
[BOOLEAN]='reboot-to-firmware'
|
[BOOLEAN]='reboot-to-firmware'
|
||||||
[FILE]='kernel-identify kernel-inspect'
|
[FILE]='kernel-identify kernel-inspect'
|
||||||
)
|
)
|
||||||
|
@ -341,7 +341,7 @@ static int help(int argc, char *argv[], void *userdata) {
|
|||||||
" --efi-boot-option-description=DESCRIPTION\n"
|
" --efi-boot-option-description=DESCRIPTION\n"
|
||||||
" Description of the entry in the boot option list\n"
|
" Description of the entry in the boot option list\n"
|
||||||
" --dry-run Dry run (unlink and cleanup)\n"
|
" --dry-run Dry run (unlink and cleanup)\n"
|
||||||
" --secure-boot-auto-enroll\n"
|
" --secure-boot-auto-enroll=yes|no\n"
|
||||||
" Set up secure boot auto-enrollment\n"
|
" Set up secure boot auto-enrollment\n"
|
||||||
" --private-key=PATH|URI\n"
|
" --private-key=PATH|URI\n"
|
||||||
" Private key to use when setting up secure boot\n"
|
" Private key to use when setting up secure boot\n"
|
||||||
@ -652,7 +652,7 @@ static int parse_argv(int argc, char *argv[]) {
|
|||||||
return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "--install-from-host is only supported with --root= or --image=.");
|
return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "--install-from-host is only supported with --root= or --image=.");
|
||||||
|
|
||||||
if (arg_dry_run && argv[optind] && !STR_IN_SET(argv[optind], "unlink", "cleanup"))
|
if (arg_dry_run && argv[optind] && !STR_IN_SET(argv[optind], "unlink", "cleanup"))
|
||||||
return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "--dry is only supported with --unlink or --cleanup");
|
return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "--dry-run is only supported with --unlink or --cleanup");
|
||||||
|
|
||||||
if (arg_secure_boot_auto_enroll && !arg_certificate)
|
if (arg_secure_boot_auto_enroll && !arg_certificate)
|
||||||
return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Secure boot auto-enrollment requested but no certificate provided");
|
return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Secure boot auto-enrollment requested but no certificate provided");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user