29 lines
536 B
Plaintext
29 lines
536 B
Plaintext
![]() |
description "Unload all Kernel Modules"
|
||
|
author "Harald Kueller <harald.kueller@compuextreme.de>"
|
||
|
version 1.0
|
||
|
emits none special
|
||
|
|
||
|
start on stopping udev
|
||
|
|
||
|
script
|
||
|
if [ -f /etc/sysconfig/loadmods ]; then
|
||
|
Z=0
|
||
|
while [ "$Z" "<" "9" ]; do
|
||
|
exec 3</proc/modules
|
||
|
while read <&3 MODNAME INFO; do
|
||
|
if rmmod -s $MODNAME &>/dev/null; then
|
||
|
print_status success
|
||
|
else
|
||
|
if [ "$Z" == "8" ]; then
|
||
|
print_status failure
|
||
|
else
|
||
|
echo "failed"
|
||
|
fi
|
||
|
fi
|
||
|
done
|
||
|
(( Z = $Z + 1 ))
|
||
|
exec 3>&-
|
||
|
done
|
||
|
fi
|
||
|
end script
|