blob: 24f89880815e8a52a042bae621d84fda08d097da (
plain)
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
|
post_install(){
echo "----------------------------------------------------------------"
echo "If you are using DKMS you may be interested"
echo "in switching to catalyst-dkms package"
echo "----------------------------------------------------------------"
echo "If experiencing problems with building module or using more than"
echo "one kernel use catalyst_build_module command as root, more info:"
echo "# catalyst_build_module help"
echo "- ^^^^^^^^^^^^^^^^^^^^^ ----------------------------------------"
echo "For more info and more troubleshooting visit:"
echo "http://wiki.archlinux.org/index.php/ATI_Catalyst"
echo "----------------------------------------------------------------"
echo ""
echo "Now you MUST to run:"
echo " catalyst_build_module"
echo "Running this command as non-root is a better way"
echo ""
echo "If while updating generated packages there are some conflicting"
echo "fglrx modules - remove them manually with"
echo " rm OR"
echo " pacman -R catalyst-{kernver} (recommended)"
}
post_upgrade(){
echo "If you are using DKMS you may be interested"
echo "in switching to catalyst-dkms package"
echo "----------------------------------------------------------------"
echo "Don't forget to manually rebuild packages"
}
post_remove(){
# remove log
rm -f var/log/catalyst-install.log
echo ""
echo "Manually remove (with pacman -R) those packages:"
if [ -d "/usr/lib/modules" ]; then
for p in /usr/lib/modules/*; do
if [[ ${p:17:3} != "ext" ]]; then
if [[ -e $p/video/fglrx.ko.gz ]]; then
echo "catalyst-${p##*/usr/lib/modules/}"
fi
elif [[ ${p:17:3} = "ext" ]]; then
if [[ -e $p/fglrx.ko.gz ]]; then
echo "catalyst-${p##*/usr/lib/modules/extramodules-}"
fi
fi
done
fi
if [ -d "/lib/modules" ] && [ -d "/usr/lib/modules" ]; then
for ls_lib in /lib/modules/*; do
repeat=0
for ls_usr in /usr/lib/modules/*; do
if [ ${ls_lib##*/lib/modules/} = ${ls_usr##*/usr/lib/modules/} ];then
repeat=1
break
fi
done
if [[ $repeat == "0" ]]; then
if [[ ${ls_lib:13:3} != "ext" ]]; then
if [[ -e $ls_lib/video/fglrx.ko.gz ]]; then
echo "catalyst-${ls_lib##*/lib/modules/}"
fi
elif [[ ${ls_lib:13:3} = "ext" ]]; then
if [[ -e $ls_lib/fglrx.ko.gz ]]; then
echo "catalyst-${ls_lib##*/lib/modules/extramodules-}"
fi
fi
fi
done
elif [[ -d "/lib/modules" ]] && [[ ! -d "/usr/lib/modules" ]]; then
for p in /lib/modules/*; do
if [[ ${p:13:3} != "ext" ]]; then
if [[ -e $p/video/fglrx.ko.gz ]]; then
echo "catalyst-${p##*/lib/modules/}"
fi
elif [[ ${p:13:3} = "ext" ]]; then
if [[ -e $p/fglrx.ko.gz ]]; then
echo "catalyst-${p##*/lib/modules/extramodules-}"
fi
fi
done
fi
}
|