From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH pve-kernel-meta 2/7] proxmox-boot-tool: add status command
Date: Thu, 22 Apr 2021 16:01:03 +0200 [thread overview]
Message-ID: <1619099984.o68gb1m8s2.astroid@nora.none> (raw)
In-Reply-To: <20210422111801.4193-3-s.ivanov@proxmox.com>
On April 22, 2021 1:17 pm, Stoiko Ivanov wrote:
> currently simply checking if $ESP_LIST exists, and indicating via
> the exit status if proxmox-boot-tool is used for booting the system.
>
> Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
> ---
> bin/proxmox-boot-tool | 20 ++++++++++++++++++++
> 1 file changed, 20 insertions(+)
>
> diff --git a/bin/proxmox-boot-tool b/bin/proxmox-boot-tool
> index 2d625a6..7b06d57 100755
> --- a/bin/proxmox-boot-tool
> +++ b/bin/proxmox-boot-tool
> @@ -283,6 +283,7 @@ usage() {
> warn " $0 refresh [--hook <name>]"
> warn " $0 kernel <add|remove> <kernel-version>"
> warn " $0 kernel list"
> + warn " $0 status"
> warn " $0 help"
> }
>
> @@ -312,6 +313,20 @@ help() {
> echo ""
> echo " list kernel versions currently selected for inclusion on ESPs."
> echo ""
> + echo "USAGE: $0 status [--verbose]"
> + echo ""
> + echo " Exit with 0 if any ESP is configured, else with 2."
> + echo ""
> +}
> +
> +status() {
> + verbose="$1"
> + if [ ! -e ${ESP_LIST} ]; then
> + if [ -n "$verbose" ]; then
> + warn "E: $ESP_LIST does not exist."
this is a bit strange (a command called status that has a verbose flag
that does not output anything if everything is okay). maybe we could
list the ESPs? or even, if --verbose is given, mount them and print
THEIR status? ANY output would be great as a start ;)
> + fi
> + exit 2
> + fi
> }
>
> if [ -z "$1" ]; then
> @@ -390,6 +405,11 @@ case "$1" in
> ;;
> esac
> ;;
> + 'status')
> + shift
> + status "$1"
> + exit 0
> + ;;
> 'help')
> shift
> help
> --
> 2.20.1
>
>
>
> _______________________________________________
> pve-devel mailing list
> pve-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
>
>
>
next prev parent reply other threads:[~2021-04-22 14:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-22 11:17 [pve-devel] [PATCH pve-kernel-meta/pve-installer] boot ZFS on legacy BIOS systems from vfat Stoiko Ivanov
2021-04-22 11:17 ` [pve-devel] [PATCH pve-kernel-meta 1/7] proxmox-boot-tool: rename from pve-efiboot-tool Stoiko Ivanov
2021-04-22 13:27 ` Fabian Grünbichler
2021-04-22 11:17 ` [pve-devel] [PATCH pve-kernel-meta 2/7] proxmox-boot-tool: add status command Stoiko Ivanov
2021-04-22 14:01 ` Fabian Grünbichler [this message]
2021-04-22 11:17 ` [pve-devel] [PATCH pve-kernel-meta 3/7] proxmox-boot-tool: sort and remove duplicates on clean Stoiko Ivanov
2021-04-22 11:17 ` [pve-devel] [PATCH pve-kernel-meta 4/7] proxmox-boot: rename uuid list file Stoiko Ivanov
2021-04-22 11:17 ` [pve-devel] [PATCH pve-kernel-meta 5/7] proxmox-boot-tool: handle legacy boot zfs installs Stoiko Ivanov
2021-04-22 11:17 ` [pve-devel] [PATCH pve-kernel-meta 6/7] proxmox-boot: add grub.cfg header snippet Stoiko Ivanov
2021-04-22 11:18 ` [pve-devel] [PATCH pve-kernel-meta 7/7] proxmox-boot: add grub-install wrapper Stoiko Ivanov
2021-04-22 11:18 ` [pve-devel] [PATCH installer 1/1] always boot zfs with proxmox-boot-tool Stoiko Ivanov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1619099984.o68gb1m8s2.astroid@nora.none \
--to=f.gruenbichler@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox