File: make-fbdev-blacklist

package info (click to toggle)
udev 164-3
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 4,336 kB
  • ctags: 1,738
  • sloc: ansic: 18,516; sh: 11,378; perl: 1,725; xml: 1,286; makefile: 692; python: 34
file content (26 lines) | stat: -rw-r--r-- 562 bytes parent folder | download
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
#!/bin/sh
# This script should be run before building the package every time a new
# kernel is released.

set -e

BL='fbdev-blacklist.conf'

if [ -e extra/$BL ]; then cd extra; fi

{
printf "# This file blacklists the framebuffer drivers.\n\n"

find /lib/modules/$(uname -r)/kernel/drivers/video -type f | sort | \
while read file; do
  /sbin/modinfo $file | grep -q '^alias: *pci:' \
    && echo blacklist $(basename $file .ko) || true
done
} > $BL.tmp

if diff --unified=0 $BL $BL.tmp; then 
  rm $BL.tmp
else
  printf "\n\n\n$BL.tmp has changes!\n\n\n\n"
fi