This file is indexed.

/usr/sbin/isenkram-pkginstall is in isenkram-cli 0.18+deb8u1.

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
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
#! /bin/sh
#
# Copyright (C) 2014 Petter Reinholdtsen <pere@hungry.com>
#
# Licensed under the GNU General Public License Version 2
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.

set -e

# Make sure the debconf question is asked in a sub-process, to avoid
# locking the debconf database when installing packages.
if [ true = "$LOOKUP_PKGINSTALL_ASKING" ] ; then
    . /usr/share/debconf/confmodule
    pkglist="`echo $@ | sed 's/ /, /g'`"
    db_subst isenkram/install_hw_packages PACKAGES "$pkglist"
    db_set isenkram/install_hw_packages "$pkglist"
    db_fset isenkram/install_hw_packages seen false
    db_input high isenkram/install_hw_packages || [ $? -eq 30 ]
    db_go
    db_get isenkram/install_hw_packages
    db_stop
    echo $RET | sed 's/,//g' 1>&8
    exit 0
fi

usage ()
{
    cat <<EOF
usage: $0 [-lnv]

Install packages based on detected hardware.  It will use the isenkram
system to map from hardware to debian packages and install the
packages by default.  Packages using module-assistant will be
automatically built and the result installed if module-assistant is
installed or pulled in as a dependency.

  -l  list packages
  -v  be verbose
  -n  only echo commands, do not run them

EOF
}

###############################################################################

nop=
verbose=false
listonly=false
while getopts lnv ch; do
    case $ch in
    l)
        listonly=true
        ;;
    n)
        nop=echo
        ;;
    v)
        verbose=true
        ;;
    ?)
        usage
        exit 64
    esac
done
shift $((${OPTIND} - 1))

###############################################################################

# Build kernel modules from all module-assistant packages.
assist_modules() {
    # Check if any packages supported by module-assistant is installed
    if [ ! -x /usr/bin/module-assistant ] ; then
	return # module-assistant not installed, no need to continue
    fi
    prepared=false
    for pkg in $packages ; do
	# Check if this package is supported by module-assistant
	if module-assistant --text-mode --non-inter list $pkg |
	    grep -q 'package not installed' ; then
	    :
	else
	    if [ false = "$prepared" ] ; then
                # Would like to use --non-inter here, but then prepare
                # exits using 254
		if module-assistant --text-mode prepare ; then
		    prepared=true
		else
		    echo error: Failed to prepare module-assistant.
		    return
		fi
	    fi
	    ${verbose} && echo "info: invoking module-assistant to handle $pkg."
	    $nop module-assistant --text-mode --non-inter \
		build,install,clean $pkg
	fi
    done
}

${verbose} && printf "Discovering packages for the current hardware: "
packages=$( (isenkram-lookup -l || true ; \
    isenkram-autoinstall-firmware -l 2>/dev/null || true ) | sort -u)
${verbose} && echo ${packages}

if [ "$packages" ] ; then
    if [ true = "$listonly" ] ; then
        echo $packages
    else
        # Trick to avoid locking the debconf database when installing
        # packages.  The redirects are gross hacks to work around
        # debconf file descriptor handling
        tempfile=$(tempfile)
        LOOKUP_PKGINSTALL_ASKING=true $0 $packages 8>$tempfile
        packages=$(cat $tempfile)
        rm $tempfile

        if [ "$packages" ] ; then
            if [ -x /usr/bin/debconf-apt-progress ] ; then
                if [ "$DI_PROGRESS_BAR_VISIBLE" ]; then
                    debconf_apt_progress_opts=--no-progress
                else
                    debconf_apt_progress_opts=
                fi
                $nop debconf-apt-progress $debconf_apt_progress_opts -- apt-get install -q -y $packages
            else
                $nop apt-get install -y $packages
            fi
            assist_modules
        fi
    fi
else
    ${verbose} && echo "info: no hardware specific packages found for this machine"
fi

exit 0