Skip to content

Commit

Permalink
fish: sd_boot_kernel: Add support for passing along '--when='
Browse files Browse the repository at this point in the history
Signed-off-by: Nathan Chancellor <[email protected]>
  • Loading branch information
nathanchance committed Dec 12, 2024
1 parent a21bcbe commit 1b44869
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions fish/functions/sd_boot_kernel.fish
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ function sd_boot_kernel -d "Boot a kernel via full reboot or kexec using systemd
set reboot kexec
case -r --reboot
set reboot reboot
case --when='*'
set -a systemctl_args $arg
case '*'
set krnl linux-(string replace 'linux-' '' $arg)
end
Expand Down Expand Up @@ -62,8 +64,8 @@ function sd_boot_kernel -d "Boot a kernel via full reboot or kexec using systemd
return 1
end

set -a reboot --boot-loader-entry=$conf
set -a systemctl_args --boot-loader-entry=$conf
end

sudo systemctl $reboot
sudo systemctl $reboot $systemctl_args
end

0 comments on commit 1b44869

Please sign in to comment.