mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-23 21:51:27 +00:00
/etc/init.d/scst: Wait up to 30s before giving up trying to unload a kernel module (merge r4608 from trunk)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@4689 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -181,7 +181,12 @@ unload_scst() {
|
||||
# occurs, sleep for a short time.
|
||||
sleep 1
|
||||
fi
|
||||
if [ -e /sys/module/$m/refcnt ] && ! rmmod $m; then
|
||||
i=0
|
||||
while [ -e /sys/module/$m/refcnt ] && ! rmmod $m && [ $i -lt 30 ]; do
|
||||
sleep 1
|
||||
i=$((i+1))
|
||||
done
|
||||
if [ -e /sys/module/$m/refcnt ]; then
|
||||
return 1
|
||||
fi
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user