Marc e676793328
Update Modules for 2.6.0+ (Wave 1) (#71)
* Misc: Ignore JetBrains IDE files

* Modules: Update Modules for 2.6.0 (1)

* SiteSurvey: Actually install mdk3 dependency.

* Modules: Bump version numbers for updated modules
2019-08-21 21:15:53 +01:00

37 lines
712 B
Bash
Executable File

#!/bin/sh
#2015 - Whistle Master
[[ -f /tmp/tcpdump.progress ]] && {
exit 0
}
touch /tmp/tcpdump.progress
if [ "$1" = "install" ]; then
if [ "$2" = "internal" ]; then
opkg update
opkg install tcpdump
elif [ "$2" = "sd" ]; then
opkg update
opkg install tcpdump --dest sd
fi
if [ ! -f /usr/lib/libpcap.so ] && [ -f /usr/lib/libpcap.so.1.3 ]; then
ln -s /usr/lib/libpcap.so /usr/lib/libpcap.so.1.3
fi
touch /etc/config/tcpdump
echo "config tcpdump 'module'" > /etc/config/tcpdump
uci set tcpdump.module.installed=1
uci commit tcpdump.module.installed
elif [ "$1" = "remove" ]; then
opkg remove tcpdump
rm -rf /etc/config/tcpdump
fi
rm /tmp/tcpdump.progress