|
@@ -150,7 +150,7 @@
|
|
opkg="$opkg $1"
|
|
opkg="$opkg $1"
|
|
shift
|
|
shift
|
|
;;
|
|
;;
|
|
-@@ -35,8 +35,31 @@ case "$action" in
|
|
|
|
|
|
+@@ -35,8 +35,36 @@ case "$action" in
|
|
if flock -x 200; then
|
|
if flock -x 200; then
|
|
$opkg $action "$@" </dev/null >/tmp/opkg.out 2>/tmp/opkg.err
|
|
$opkg $action "$@" </dev/null >/tmp/opkg.out 2>/tmp/opkg.err
|
|
code=$?
|
|
code=$?
|
|
@@ -159,7 +159,7 @@
|
|
+ $opkg $action luci-i18n-"$(echo $@ | cut -d - -f 3-)"-zh-cn </dev/null >>/tmp/opkg.out 2>/dev/null
|
|
+ $opkg $action luci-i18n-"$(echo $@ | cut -d - -f 3-)"-zh-cn </dev/null >>/tmp/opkg.out 2>/dev/null
|
|
+ fi
|
|
+ fi
|
|
+ case "$action" in
|
|
+ case "$action" in
|
|
-+ install|upgrade)
|
|
|
|
|
|
++ install)
|
|
+ [ "$(opkg list-installed | cut -f 1 -d ' ' | grep -w $@)" ] && {
|
|
+ [ "$(opkg list-installed | cut -f 1 -d ' ' | grep -w $@)" ] && {
|
|
+ rm -f /tmp/opkg.err
|
|
+ rm -f /tmp/opkg.err
|
|
+ }
|
|
+ }
|
|
@@ -167,6 +167,11 @@
|
|
+ echo $@ >>/etc/backup/user_installed.opkg
|
|
+ echo $@ >>/etc/backup/user_installed.opkg
|
|
+ }
|
|
+ }
|
|
+ ;;
|
|
+ ;;
|
|
|
|
++ upgrade)
|
|
|
|
++ [ "$(opkg list-installed | cut -f 1 -d ' ' | grep -w $@)" ] && {
|
|
|
|
++ rm -f /tmp/opkg.err
|
|
|
|
++ }
|
|
|
|
++ ;;
|
|
+ remove)
|
|
+ remove)
|
|
+ [ ! "$(opkg list-installed | cut -f 1 -d ' ' | grep -w $@)" ] && {
|
|
+ [ ! "$(opkg list-installed | cut -f 1 -d ' ' | grep -w $@)" ] && {
|
|
+ rm -f /tmp/opkg.err
|
|
+ rm -f /tmp/opkg.err
|