Skip to content
Snippets Groups Projects
Commit 57df6e7b authored by Lior Spach's avatar Lior Spach
Browse files

le-pregao-712010: Refs #1280, Check whether linux-headers is installed


Signed-off-by: default avatarLior Spach <ls12@inf.ufpr.br>
parent 295182eb
No related branches found
No related tags found
No related merge requests found
......@@ -25,13 +25,17 @@ PACKAGE_VERSION="2.3.0.0-Alpha-v2"
KERNEL_VERSION="$(uname -r)"
ALL_KERNEL_VERSION="$(dpkg --get-selections | egrep '^linux-image.*generic-pae.*install$' | awk '{print $1}' | cut --bytes=13-)"
# Put conflicting modules at /etc/modprobe.d/blacklist.conf
echo "# replaced by rt3562sta" >> /etc/modprobe.d/blacklist.conf
echo "blacklist rt2800pci" >> /etc/modprobe.d/blacklist.conf
# Put conflicting modules at /etc/modprobe.d/blacklist.conf
echo "# enable wireless for pregao 71/2010" >> /etc/modules
echo "rt3562sta" >> /etc/modules
#Verify if linux-headers already installed
TEST_HEADERS_INSTALLED="$(dpkg --get-selections | grep "linux-headers-${KERNEL_VERSION}.*install$")"
echo -n "Verifying if linux-headers are installed... "
if [ "$TEST_HEADERS_INSTALLED" != "" ]; then
echo "Ok."
else
echo "WARNING: LINUX-HEADERS MISSING"
echo "Install manually by typing the command"
echo "apt-get install linux-headers-$KERNEL_VERSION"
fi
# Function to set selections
setselections() {
......@@ -53,11 +57,12 @@ rm -f ${sels}
setselections ${auxfile} & disown
echo "Building and Installing module for each installed kernel using dkms..."
dkms add -m $PACKAGE_NAME -v $PACKAGE_VERSION
dkms add -m $PACKAGE_NAME -v $PACKAGE_VERSION || true
for EACH_KERNEL in $ALL_KERNEL_VERSION
do
dkms build -m $PACKAGE_NAME -v $PACKAGE_VERSION -k $EACH_KERNEL
dkms install -m $PACKAGE_NAME -v $PACKAGE_VERSION -k $EACH_KERNEL
echo "FOR KERNEl: $EACH_KERNEL"
dkms build -m $PACKAGE_NAME -v $PACKAGE_VERSION -k $EACH_KERNEL || true
dkms install -m $PACKAGE_NAME -v $PACKAGE_VERSION -k $EACH_KERNEL || true
done
echo "Loading module rt3562sta"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment