summaryrefslogtreecommitdiffstats
path: root/abs/extra/sapphire/sapphire.install
blob: 18150eb0d7cabd066be053b26d85a9e0606c7aea (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
post_install() {
    echo ">>> Removing duplicate compressed kernel modules..."
    for file in `find /lib/modules -name "*.ko"`; do if [[ -e $file.gz ]]; then rm "$file.gz"; fi; done
    echo ">>> Running depmod..."
    depmod
    rmmod hid_topseed
    modprobe sapphire
    echo "If you wish to make changes to key mapping, read the docs in /usr/share/doc/sapphire."
    echo "sapphire_keymap.sh is already installed in /usr/bin"
}

post_upgrade() {
    echo ">>> Removing duplicate compressed kernel modules..."
    for file in `find /lib/modules -name "*.ko"`; do if [[ -e $file.gz ]]; then rm "$file.gz"; fi; done
    echo ">>> Running depmod..."
    depmod
    rmmod sapphire
    modprobe sapphire
    echo "If you wish to make changes to key mapping, read the docs in /usr/share/doc/sapphire."
    echo "sapphire_keymap.sh is already installed in /usr/bin"
}

post_remove() {
    depmod
    rmmod sapphire
}