File: systemd-boot

package info (click to toggle)
systemd 259.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 113,388 kB
  • sloc: ansic: 727,211; xml: 121,125; python: 36,732; sh: 34,990; cpp: 946; makefile: 278; awk: 102; lisp: 13; sed: 1
file content (20 lines) | stat: -rwxr-xr-x 375 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh

set -eu

test -x /usr/bin/bootctl || exit 0

bootctl is-installed --quiet || exit 0

if [ -f "/boot/vmlinuz-$1" ]; then
    k="/boot/vmlinuz-$1"
elif [ -f "/boot/vmlinux-$1" ]; then
    k="/boot/vmlinux-$1"
else
    echo "Kernel version $1 not found in /boot."
    exit 0
fi

echo "Updating kernel version $1 in systemd-boot..."

kernel-install add "$1" "$k" "$2"