This file is indexed.

/usr/sbin/lustre_rmmod is in lustre-utils 1.8.5+dfsg-3ubuntu1.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/sh
#
# remove all lustre modules.  Won't succeed if they're in use, or if you
# manually did a 'lctl network up'.
###############################################################################

FSTYPE=${1:-ldiskfs}

TMP=${TMP:-/tmp}
LUSTRE=${LUSTRE:-$(cd $(dirname $0)/..; echo $PWD)}
LCTL=${LCTL:-"$LUSTRE/utils/lctl"}
[ ! -f "$LCTL" ] && export LCTL=$(which lctl 2> /dev/null)

RMMOD=rmmod
if [ `uname -r | cut -c 3` -eq 4 ]; then
    RMMOD="modprobe -r"
fi

unload_dep_module() {
    # libcfs                107852  17 llite_lloop,lustre,obdfilter,ost,...
    local MODULE=$1
    local DEPS="$(lsmod | awk '($1 == "'$MODULE'") { print $4 }' | tr ',' ' ')"
    for SUBMOD in $DEPS; do
        unload_dep_module $SUBMOD
    done
    [ "$MODULE" = "libcfs" ] && $LCTL dk $TMP/debug >/dev/null || true
    $RMMOD $MODULE 2>/dev/null || true
    return 0
}

lsmod | grep libcfs > /dev/null && $LCTL dl
lsmod | grep $FSTYPE && unload_dep_module $FSTYPE
unload_dep_module libcfs

MODULES=$($LCTL modules | awk '{ print $2 }')
if [ -n "$MODULES" ]; then
    echo "Modules still loaded: "
    echo $MODULES
    exit 1
fi
exit 0