diff options
author | Ludwig Nussel <ludwig.nussel@suse.de> | 2022-12-08 16:27:31 +0100 |
---|---|---|
committer | Ludwig Nussel <ludwig.nussel@suse.de> | 2023-01-19 14:24:43 +0100 |
commit | 8702496bfb0205764569782a9a2ebd11fd80e5e8 (patch) | |
tree | 1b610c546c1ef4fb3422341430edab09bf5873f3 /shell-completion | |
parent | 1132fd73b32a06c6349f20c0cfb235cc854a1a3a (diff) | |
download | systemd-8702496bfb0205764569782a9a2ebd11fd80e5e8.tar.gz |
bootctl: unlink and cleanup functions
The unlink command removes an entry from the ESP including
referenced files that are not referenced in other entries. That is
useful eg to have multiple entries that use the same kernel with
different options.
The cleanup command removes all files that are not referenced by any
entry.
Diffstat (limited to 'shell-completion')
-rw-r--r-- | shell-completion/bash/bootctl | 6 | ||||
-rw-r--r-- | shell-completion/zsh/_bootctl | 7 |
2 files changed, 10 insertions, 3 deletions
diff --git a/shell-completion/bash/bootctl b/shell-completion/bash/bootctl index 0b7cef7871..8d8b507ea9 100644 --- a/shell-completion/bash/bootctl +++ b/shell-completion/bash/bootctl @@ -31,7 +31,7 @@ _bootctl() { local i verb comps local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} local -A OPTS=( - [STANDALONE]='-h --help -p --print-esp-path -x --print-boot-path --version --no-variables --no-pager --graceful' + [STANDALONE]='-h --help -p --print-esp-path -x --print-boot-path --version --no-variables --no-pager --graceful --dry-run' [ARG]='--esp-path --boot-path --make-machine-id-directory --root --image --install-source' ) @@ -67,8 +67,8 @@ _bootctl() { 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 systemd-efi-options list set-timeout set-timeout-oneshot' - [BOOTENTRY]='set-default set-oneshot' + [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' [BOOLEAN]='reboot-to-firmware' ) diff --git a/shell-completion/zsh/_bootctl b/shell-completion/zsh/_bootctl index 8634e8b9bc..83d910cda1 100644 --- a/shell-completion/zsh/_bootctl +++ b/shell-completion/zsh/_bootctl @@ -24,6 +24,10 @@ _bootctl_set-oneshot() { _bootctl_comp_ids } +_bootctl_unlink() { + _bootctl_comp_ids +} + _bootctl_reboot-to-firmware() { local -a _completions _completions=( yes no ) @@ -48,6 +52,8 @@ _bootctl_reboot-to-firmware() { "set-oneshot:Set the default boot loader entry only for the next boot" "set-timeout:Set the menu timeout" "set-timeout-oneshot:Set the menu timeout for the next boot only" + "unlink:Remove boot loader entry" + "cleanup:Remove files in ESP not referenced in any boot entry" ) if (( CURRENT == 1 )); then _describe -t commands 'bootctl command' _bootctl_cmds || compadd "$@" @@ -73,6 +79,7 @@ _arguments \ '--no-variables[Do not touch EFI variables]' \ '--no-pager[Do not pipe output into a pager]' \ '--graceful[Do not fail when locating ESP or writing fails]' \ + '--dry-run[Dry run (unlink and cleanup)]' \ '--root=[Operate under the specified directory]:PATH' \ '--image=[Operate on the specified image]:PATH' \ '--install-source[Where to pick files when using --root=/--image=]:options:(image host auto)' \ |