]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
kernel-install: drop redundant "/"
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 20 Nov 2020 09:25:06 +0000 (18:25 +0900)
committerLennart Poettering <lennart@poettering.net>
Tue, 24 Nov 2020 10:18:40 +0000 (11:18 +0100)
Follow-up for 1cdbff1c844ce46f1d84d8feeed426ebfd550988.

After the commit 1cdbff1c844ce46f1d84d8feeed426ebfd550988, each entry .conf contains
redundant slash like the following:
```
$ cat xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-5.9.8-200.fc33.x86_64.conf
title      Fedora 33 (Thirty Three)
version    5.9.8-200.fc33.x86_64
machine-id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
options    root=/dev/nvme0n1p2 ro rootflags=subvol=system/fedora selinux=0 audit=0
linux      //xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/5.9.8-200.fc33.x86_64/linux
initrd     //xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/5.9.8-200.fc33.x86_64/initrd
```

src/kernel-install/90-loaderentry.install

index 567d2b9f4bb8ba2696f543a4bdd6ff3d9f3ec416..d096745382354666e15cf58aee4d55c45eb28254 100644 (file)
@@ -20,7 +20,7 @@ MACHINE_ID=$KERNEL_INSTALL_MACHINE_ID
 
 BOOT_ROOT=${ENTRY_DIR_ABS%/$MACHINE_ID/$KERNEL_VERSION}
 BOOT_MNT=$(stat -c %m $BOOT_ROOT)
-ENTRY_DIR=/${ENTRY_DIR_ABS#$BOOT_MNT}
+ENTRY_DIR=${ENTRY_DIR_ABS#$BOOT_MNT}
 
 if [[ $COMMAND == remove ]]; then
     rm -f "$BOOT_ROOT/loader/entries/$MACHINE_ID-$KERNEL_VERSION.conf"