~ubuntu-branches/debian/sid/dkms/sid

« back to all changes in this revision

Viewing changes to .pc/remove-old-mod.patch/kernel_prerm.d_dkms

  • Committer: Bazaar Package Importer
  • Author(s): Giuseppe Iuculano
  • Date: 2011-07-15 12:56:08 UTC
  • mfrom: (1.1.15 upstream)
  • Revision ID: james.westby@ubuntu.com-20110715125608-75jxdh6ycol331kk
Tags: 2.2.0.1-1
* [18353fe] Imported Upstream version 2.2.0.1
* [2a56b4e] Refreshed and removed patches merged upstream.
* [c552af9] Use linux-headers-686-pae and linux-headers-amd64 in Recommends
  (Closes: #628873)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/bash
2
 
 
3
 
# We're passed the version of the kernel being installed
4
 
inst_kern=$1
5
 
 
6
 
if [ -x /usr/sbin/dkms ]; then
7
 
while read line; do
8
 
   name=`echo "$line" | awk '{print $1}' | sed 's/,$//'`
9
 
   vers=`echo "$line" | awk '{print $2}' | sed 's/,$//'`
10
 
   arch=`echo "$line" | awk '{print $4}' | sed 's/:$//'`
11
 
   echo "dkms: uninstalling: $name $vers ($inst_kern) ($arch)" >&2
12
 
   dkms uninstall -m $name -v $vers -k $inst_kern -a $arch
13
 
done < <(dkms status -k $inst_kern 2>/dev/null | grep ": installed")
14
 
fi
15
 
 
16
 
rmdir --ignore-fail-on-non-empty \
17
 
        "/lib/modules/$inst_kern/updates/dkms" \
18
 
        "/lib/modules/$inst_kern/updates" 2>/dev/null
19
 
 
20
 
exit 0