2024-01-23 13:17:51 +03:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# install prerequisites
|
|
|
|
|
|
|
|
EXEDIR="$(dirname "$0")"
|
|
|
|
EXEDIR="$(cd "$EXEDIR"; pwd)"
|
|
|
|
ZAPRET_CONFIG="$EXEDIR/config"
|
|
|
|
ZAPRET_BASE="$EXEDIR"
|
|
|
|
|
|
|
|
. "$ZAPRET_CONFIG"
|
|
|
|
. "$ZAPRET_BASE/common/base.sh"
|
|
|
|
. "$ZAPRET_BASE/common/elevate.sh"
|
|
|
|
. "$ZAPRET_BASE/common/fwtype.sh"
|
|
|
|
. "$ZAPRET_BASE/common/dialog.sh"
|
|
|
|
. "$ZAPRET_BASE/common/installer.sh"
|
|
|
|
. "$ZAPRET_BASE/common/ipt.sh"
|
|
|
|
|
|
|
|
umask 0022
|
|
|
|
fix_sbin_path
|
2024-01-25 20:47:08 +03:00
|
|
|
fsleep_setup
|
2024-01-23 17:08:50 +03:00
|
|
|
check_system accept_unknown_rc
|
2024-01-23 13:27:42 +03:00
|
|
|
[ $UNAME = "Linux" ] || {
|
|
|
|
echo no prerequisites required for $SYSTEM
|
|
|
|
}
|
2024-01-23 13:17:51 +03:00
|
|
|
require_root
|
|
|
|
|
|
|
|
case $UNAME in
|
|
|
|
Linux)
|
2024-01-23 13:27:42 +03:00
|
|
|
select_fwtype
|
2024-01-23 13:17:51 +03:00
|
|
|
case $SYSTEM in
|
|
|
|
openwrt)
|
2024-01-23 13:27:42 +03:00
|
|
|
select_ipv6
|
2024-01-23 13:17:51 +03:00
|
|
|
check_prerequisites_openwrt
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
check_prerequisites_linux
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
exitp 0
|