mirror of
https://github.com/archlinux-jerry/pkgbuilds
synced 2024-11-25 15:30:40 +08:00
Revert "update: kernel-modules-hook-hardlinks: fix umount issue caused by udevd try 1"
This reverts commit 3591f5ee9e
.
This commit is contained in:
parent
3591f5ee9e
commit
92d1a61ebf
2 changed files with 2 additions and 13 deletions
|
@ -4,18 +4,8 @@ kver=$(uname -r)
|
|||
while read -r line; do
|
||||
# We only care about the running kernel
|
||||
if [[ "$line" == usr/lib/modules/$kver/vmlinuz && -d usr/lib/modules/running-kernel ]];then
|
||||
mount --mkdir --bind --options ro /usr/lib/modules/{running-kernel,$kver} || continue
|
||||
mount --mkdir --bind --options ro /usr/lib/modules/{running-kernel,$kver}
|
||||
# Mounting read-only since the only modification here should be unmounting
|
||||
# when rebooting or reinstalling the running kernel
|
||||
mount_unit="usr-lib-modules-${kver//-/\\x2d}.mount"
|
||||
install -Dm644 <(
|
||||
cat << EOF
|
||||
[Unit]
|
||||
After=$mount_unit
|
||||
Requires=$mount_unit
|
||||
EOF
|
||||
) /run/systemd/system/systemd-udevd.service.d/kernel-modules-hook-hardlinks.conf
|
||||
systemctl daemon-reload
|
||||
# Required for clean umount on shutdown
|
||||
fi
|
||||
done
|
||||
|
|
|
@ -9,8 +9,7 @@ while read -r line; do
|
|||
# This means we already ran that hook during 'remove case'
|
||||
#
|
||||
# Remove the mount so we can reinstall the kernel
|
||||
# Fixme: systemd-udevd would likely block the umount
|
||||
umount /${line%vmlinuz}
|
||||
umount ${line%vmlinuz}
|
||||
elif [[ -f "$line" && ! -d "/usr/lib/modules/running-kernel/" ]];then
|
||||
# Kernel install is present and we do not have a copy
|
||||
#
|
||||
|
|
Loading…
Reference in a new issue