mirror of
https://github.com/systemd/systemd.git
synced 2025-05-27 21:05:55 +03:00
kernel-insteall: do not remove the first slash in $ENTRY_DIR
Follow-up for cd0d230e7bf87f979722de7e364619dfa71bd6a2. Fixes #19456.
This commit is contained in:
parent
65a245c3ef
commit
2ff739a6ac
@ -36,7 +36,11 @@ 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}
|
||||
if [[ $BOOT_MNT == '/' ]]; then
|
||||
ENTRY_DIR=$ENTRY_DIR_ABS
|
||||
else
|
||||
ENTRY_DIR=${ENTRY_DIR_ABS#$BOOT_MNT}
|
||||
fi
|
||||
|
||||
if [[ $COMMAND == remove ]]; then
|
||||
rm -f "$BOOT_ROOT/loader/entries/$MACHINE_ID-$KERNEL_VERSION.conf"
|
||||
|
Loading…
x
Reference in New Issue
Block a user