mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-27 12:04:27 +01:00
make overlay scripts use kernel modules and executables relative to pwd in preparison for 9p
This commit is contained in:
@@ -3,8 +3,8 @@ set -e
|
||||
f=/sys/kernel/debug/lkmc_dep
|
||||
f2=/sys/kernel/debug/lkmc_dep2
|
||||
|
||||
insmod /dep.ko
|
||||
insmod /dep2.ko
|
||||
insmod dep.ko
|
||||
insmod dep2.ko
|
||||
|
||||
# Initial value.
|
||||
[ "$(cat "$f")" = 0 ]
|
||||
@@ -20,8 +20,8 @@ printf 2 > "$f"
|
||||
# sysfs shows us that the module has dependants.
|
||||
[ "$(cat /sys/module/dep/refcnt)" = 1 ]
|
||||
[ "$(ls /sys/module/dep/holders)" = dep2 ]
|
||||
rmmod /dep2.ko
|
||||
rmmod dep2.ko
|
||||
[ "$(cat /sys/module/dep/refcnt)" = 0 ]
|
||||
[ -z "$(ls /sys/module/dep/holders)" ]
|
||||
|
||||
rmmod /dep.ko
|
||||
rmmod dep.ko
|
||||
|
||||
Reference in New Issue
Block a user