mirror of
https://github.com/archlinux-jerry/pkgbuilds
synced 2024-12-23 12:39:24 +08:00
12 lines
433 B
Text
12 lines
433 B
Text
|
#!/bin/bash -e
|
||
|
|
||
|
kver=$(uname -r)
|
||
|
while read -r line; do
|
||
|
# We only care about the running kernel
|
||
|
if [[ "$line" == usr/lib/modules/$kver/vmlinuz && -d "${line/$kver/running-kernel}" ]];then
|
||
|
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
|
||
|
fi
|
||
|
done
|