1 | #!/bin/sh |
---|
2 | |
---|
3 | #DEBHELPER# |
---|
4 | |
---|
5 | # DebWrt - Debian on Embedded devices |
---|
6 | # |
---|
7 | # Copyright (C) 2011,2016 Johan van Zoomeren <amain@debwrt.net> |
---|
8 | # |
---|
9 | # This program is free software: you can redistribute it and/or modify |
---|
10 | # it under the terms of the GNU General Public License as published by |
---|
11 | # the Free Software Foundation, either version 3 of the License, or |
---|
12 | # (at your option) any later version. |
---|
13 | # |
---|
14 | # This program is distributed in the hope that it will be useful, |
---|
15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
17 | # GNU General Public License for more details. |
---|
18 | # |
---|
19 | # You should have received a copy of the GNU General Public License |
---|
20 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
---|
21 | |
---|
22 | set -e |
---|
23 | |
---|
24 | ACTION=$1 |
---|
25 | VERSION=$2 |
---|
26 | |
---|
27 | case ${ACTION} in |
---|
28 | configure) |
---|
29 | if [ "brcm47xx" = "$(cat /lib/modules/debwrt.target &>/dev/null)" ] |
---|
30 | then |
---|
31 | if ! grep -q "^[ #]*wl$" /etc/modules |
---|
32 | then |
---|
33 | cat >>/etc/modules <<EOF |
---|
34 | # DebWrt - default is to use the proprietary wl driver for devices with broadcom |
---|
35 | # wireless chips. There are still performance problems with the open |
---|
36 | # source b43 driver in AP mode. Uncomment to use proprietary wl, leave |
---|
37 | # commented to use b43. |
---|
38 | # ( note: also unblacklist b43 in /etc/modprobe.d/b43.conf ) |
---|
39 | wl |
---|
40 | EOF |
---|
41 | fi |
---|
42 | fi |
---|
43 | |
---|
44 | if [ ! -e /etc/default/sslh.debwrt ] |
---|
45 | then |
---|
46 | cp /usr/share/doc/debwrt-net/default/sslh /etc/default/sslh.debwrt |
---|
47 | mv /etc/default/sslh /etc/default/sslh.org |
---|
48 | ln -s /etc/default/sslh.debwrt /etc/default/sslh |
---|
49 | |
---|
50 | # systemd only: disable by default |
---|
51 | if [ -e /bin/systemctl ] |
---|
52 | then |
---|
53 | /bin/systemctl disable sslh |
---|
54 | fi |
---|
55 | fi |
---|
56 | ;; |
---|
57 | *) |
---|
58 | ;; |
---|
59 | esac |
---|
60 | |
---|