1
0
Fork 0
mirror of https://github.com/pikvm/pikvm.git synced 2026-03-02 18:16:56 -05:00

pikvm-update powers off when --no-reboot flag is passed #961

Closed
opened 2026-02-20 14:09:04 -05:00 by deekerman · 1 comment
Owner

Originally created by @afunix on GitHub (Nov 4, 2024).

Originally assigned to: @mdevaev on GitHub.

Describe the bug
pikvm-update powers off when --no-reboot flag is passed

To Reproduce
Steps to reproduce the behavior, like:

  1. Execute pikvm-update --no-reboot

Expected behavior
PiKVM software is updated, PiKVM keeps running until manually rebooted.

Screenshots

# pikvm-update --no-reboot
...
==============================================================
      Power off requested. We will make it after 30 seconds.
            Press Ctrl+C if you don't want this.
==============================================================

PiKVM info:

  • RPi 4b
  • v3
  • KVMD version: kvmd 4.20-1
  • Linux kernel: Linux pikvm0 6.6.45-8-rpi #1 SMP Wed Oct 2 19:56:38 UTC 2024 armv7l GNU/Linux

Additional context
There is an incorrect check for _opt_power_off in the script, should be checked for -n:

while test "$#" != 0; do
    case "$1" in
...
        --no-reboot) _opt_no_reboot=1;;
        --power-off) _opt_power_off=1;;
        *) echo "Usage: pikvm-update [--no-reboot] [--power-off]"; exit 1;;
    esac
    shift
done

...


if [ -z "$_opt_no_reboot" ]; then
...
    sleep 30
    reboot
elif [ -z "$_opt_power_off" ]; then
...
    sleep 30
    poweroff
else

Originally created by @afunix on GitHub (Nov 4, 2024). Originally assigned to: @mdevaev on GitHub. **Describe the bug** pikvm-update powers off when --no-reboot flag is passed **To Reproduce** Steps to reproduce the behavior, like: 1. Execute `pikvm-update --no-reboot` **Expected behavior** PiKVM software is updated, PiKVM keeps running until manually rebooted. **Screenshots** ``` # pikvm-update --no-reboot ... ============================================================== Power off requested. We will make it after 30 seconds. Press Ctrl+C if you don't want this. ============================================================== ``` **PiKVM info:** - RPi 4b - v3 - KVMD version: kvmd 4.20-1 - Linux kernel: Linux pikvm0 6.6.45-8-rpi #1 SMP Wed Oct 2 19:56:38 UTC 2024 armv7l GNU/Linux **Additional context** There is an incorrect check for `_opt_power_off` in the script, should be checked for `-n`: ``` while test "$#" != 0; do case "$1" in ... --no-reboot) _opt_no_reboot=1;; --power-off) _opt_power_off=1;; *) echo "Usage: pikvm-update [--no-reboot] [--power-off]"; exit 1;; esac shift done ... if [ -z "$_opt_no_reboot" ]; then ... sleep 30 reboot elif [ -z "$_opt_power_off" ]; then ... sleep 30 poweroff else ```
deekerman 2026-02-20 14:09:04 -05:00
Author
Owner

@mdevaev commented on GitHub (Nov 4, 2024):

Should be fixed now.

@mdevaev commented on GitHub (Nov 4, 2024): Should be fixed now.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/pikvm-pikvm#961
No description provided.