9 stat_busy
"Unloading cloop kernel module"
10 if grep -q "^cloop" /proc
/modules
; then
14 for p
in /lib
/modules
/*; do
15 if [ ! -d "$p/kernel" ]; then
16 if [ -e "$p/misc/cloop.ko" ]; then
17 stat_busy
"Removing old cloop kernel module from $p"
18 rm -f "$p/misc/cloop.ko" 2>/dev
/null
19 rmdir -p --ignore-fail-on-non-empty "$p/misc/" 2>/dev
/null
24 if [ -e "/lib/modules/$(uname -r)/misc/cloop.ko" ]; then
25 stat_busy
"Removing old cloop kernel module"
26 rm -f "/lib/modules/$(uname -r)/misc/cloop.ko" 2>/dev
/null
29 stat_busy
"Recompiling cloop kernel module"
30 rm -f /usr
/src
/cloop
/{cloop.ko
,cloop.mod.o
,cloop.o
,compressed_loop.o
}
31 make modules
-C /usr
/src
/linux-$
(uname
-r)/ M
=/usr
/src
/cloop
>/dev
/null
2>&1
32 if [ ! -d "/lib/modules/$(uname -r)/misc" ]; then
33 mkdir
"/lib/modules/$(uname -r)/misc"
35 install -m 664 /usr
/src
/cloop
/cloop.ko
"/lib/modules/$(uname -r)/misc"
39 echo "usage: $0 {setup}"