|
@ -6,7 +6,7 @@ |
|
|
# |
|
|
# |
|
|
LC_ALL=C |
|
|
LC_ALL=C |
|
|
PATH="/usr/sbin:/usr/bin:/sbin:/bin" |
|
|
PATH="/usr/sbin:/usr/bin:/sbin:/bin" |
|
|
adb_scriptver="1.5.1" |
|
|
|
|
|
|
|
|
adb_scriptver="1.5.2" |
|
|
adb_mincfgver="2.5" |
|
|
adb_mincfgver="2.5" |
|
|
adb_hotplugif="" |
|
|
adb_hotplugif="" |
|
|
adb_lanif="lan" |
|
|
adb_lanif="lan" |
|
@ -53,15 +53,6 @@ f_envload() |
|
|
f_exit |
|
|
f_exit |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
# check opkg availability |
|
|
|
|
|
# |
|
|
|
|
|
if [ -f "/var/lock/opkg.lock" ] |
|
|
|
|
|
then |
|
|
|
|
|
rc=-10 |
|
|
|
|
|
f_log "adblock installation finished successfully, 'opkg' currently locked by package installer" |
|
|
|
|
|
f_exit |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
# uci function to parse global section by callback |
|
|
# uci function to parse global section by callback |
|
|
# |
|
|
# |
|
|
config_cb() |
|
|
config_cb() |
|
@ -138,16 +129,21 @@ f_envcheck() |
|
|
f_exit |
|
|
f_exit |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
# get list with all installed packages |
|
|
|
|
|
|
|
|
# check opkg availability |
|
|
# |
|
|
# |
|
|
pkg_list="$(opkg list-installed)" |
|
|
|
|
|
if [ -z "${pkg_list}" ] |
|
|
|
|
|
|
|
|
adb_pkglist="$(opkg list-installed)" |
|
|
|
|
|
if [ $(($?)) -eq 255 ] |
|
|
|
|
|
then |
|
|
|
|
|
rc=-10 |
|
|
|
|
|
f_log "adblock installation finished successfully, 'opkg' currently locked by package installer" |
|
|
|
|
|
f_exit |
|
|
|
|
|
elif [ -z "${adb_pkglist}" ] |
|
|
then |
|
|
then |
|
|
rc=-1 |
|
|
rc=-1 |
|
|
f_log "empty 'opkg' package list, please check your installation" |
|
|
f_log "empty 'opkg' package list, please check your installation" |
|
|
f_exit |
|
|
f_exit |
|
|
fi |
|
|
fi |
|
|
adb_sysver="$(printf "${pkg_list}" | grep "^base-files -")" |
|
|
|
|
|
|
|
|
adb_sysver="$(printf "${adb_pkglist}" | grep "^base-files -")" |
|
|
adb_sysver="${adb_sysver##*-}" |
|
|
adb_sysver="${adb_sysver##*-}" |
|
|
|
|
|
|
|
|
# get lan ip addresses |
|
|
# get lan ip addresses |
|
@ -435,7 +431,7 @@ f_envcheck() |
|
|
|
|
|
|
|
|
# remove temporary package list |
|
|
# remove temporary package list |
|
|
# |
|
|
# |
|
|
unset pkg_list |
|
|
|
|
|
|
|
|
unset adb_pkglist |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
# f_depend: check package dependencies |
|
|
# f_depend: check package dependencies |
|
@ -447,7 +443,7 @@ f_depend() |
|
|
local check_only="${2}" |
|
|
local check_only="${2}" |
|
|
package_ok="true" |
|
|
package_ok="true" |
|
|
|
|
|
|
|
|
check="$(printf "${pkg_list}" | grep "^${package}")" |
|
|
|
|
|
|
|
|
check="$(printf "${adb_pkglist}" | grep "^${package}")" |
|
|
if [ "${check_only}" = "true" ] && [ -z "${check}" ] |
|
|
if [ "${check_only}" = "true" ] && [ -z "${check}" ] |
|
|
then |
|
|
then |
|
|
package_ok="false" |
|
|
package_ok="false" |
|
|