Jump to content

Recommended Posts

  • TheBB pinned this topic
  • 1 month later...
  • 7 months later...
  • 4 months later...

Что нужно знать владельцам Keenetic`ов при обновлении (`opkg upgrade`).

Добавлен пакет "poorbox" ("обрезанный" busybox из 4-х апплетов: gunzip, gzip, tar, wget):

~ # ls -al /opt/usr/bin/
drwxr-xr-x    2 root     root          4096 Oct  7 21:17 .
drwxr-xr-x    5 root     root          4096 Oct  4 00:10 ..
-rwxr-xr-x    1 root     root         59316 Oct  4 00:10 busybox
lrwxrwxrwx    1 root     root             7 Oct  7 21:17 gunzip -> busybox
lrwxrwxrwx    1 root     root             7 Oct  7 21:17 gzip -> busybox
lrwxrwxrwx    1 root     root             7 Oct  7 21:17 tar -> busybox
lrwxrwxrwx    1 root     root             7 Oct  7 21:17 wget -> busybox
~ # 

Upgrade системы следующий:

1. обновить список пакетов - `opkg update`

2. установить пакет "poorbox" - `opkg install poorbox`

3. обновить систему - `opkg upgrade`

Это должно сделать систему более устойчивой при обновлении (пример, повторять не надо):

~ # sed -i -e 's,1.31.0-1,0.0.0,g' /opt/lib/opkg/status 
~ # opkg list-upgradable
busybox - 0.0.0 - 1.31.0-1
poorbox - 0.0.0 - 1.31.0-1
~ # opkg upgrade
Upgrading busybox on root from 0.0.0 to 1.31.0-1...
Downloading http://bin.entware.net/mipselsf-k3.4/busybox_1.31.0-1_mipsel-3.4.ipk
Upgrading poorbox on root from 0.0.0 to 1.31.0-1...
Downloading http://bin.entware.net/mipselsf-k3.4/keenetic/poorbox_1.31.0-1_mipsel-3.4_kn.ipk
Configuring busybox.
Warning: '/opt/bin/find' is already exists, skipping.
Warning: '/opt/bin/xargs' is already exists, skipping.
Warning: '/opt/bin/grep' is already exists, skipping.
Configuring poorbox.
~ #

Пакет уже включен в состав системы для новых установок.

--- upd ---

Альтернативный shell

В bash, zsh система обновляется без проблем.

В fish:

Скрытый текст

для того, чтоб не получить нечто подобное:


~ # fish
Welcome to fish, the friendly interactive shell
root@Keenetic_Ultra ~# opkg list-upgradable
busybox - 0.0.0 - 1.31.0-1
poorbox - 0.0.0 - 1.31.0-1
root@Keenetic_Ultra ~# opkg upgrade
Upgrading busybox on root from 0.0.0 to 1.31.0-1...
Downloading http://bin.entware.net/mipselsf-k3.4/busybox_1.31.0-1_mipsel-3.4.ipk
Upgrading poorbox on root from 0.0.0 to 1.31.0-1...
Downloading http://bin.entware.net/mipselsf-k3.4/keenetic/poorbox_1.31.0-1_mipsel-3.4_kn.ipk
Configuring busybox.
Collected errors:
 * opkg_download: Failed to download http://bin.entware.net/mipselsf-k3.4/keenetic/poorbox_1.31.0-1_mipsel-3.4_kn.ipk, wget returned 255.
 * opkg_install_pkg: Failed to download poorbox. Perhaps you need to run 'opkg update'?
fish: Unknown command uname
/opt/share/fish/functions/prompt_hostname.fish (line 1): 
uname -n
^
in command substitution
	called on line 4 of file /opt/share/fish/functions/prompt_hostname.fish

in function 'prompt_hostname'
	called on line 6 of file /opt/share/fish/functions/fish_prompt.fish

in command substitution
	called on line 26 of file /opt/share/fish/functions/fish_prompt.fish

in function 'fish_prompt'
	called on standard input

in command substitution
	called on standard input

root@ ~# 

надо добавить к PATH (в файле /opt/etc/fish/config.fish) - /opt/usr/bin любым удобным способом

было:


root@Keenetic_Ultra ~# env
HOME=/opt/root
LANG=en_US.UTF-8
LC_ALL=en_US.UTF-8
LOGNAME=root
PATH=/opt/sbin:/opt/bin:/usr/sbin:/usr/bin:/sbin:/bin
PWD=/opt/root
SHELL=/opt/bin/sh
SHLVL=2
SSH_CLIENT=192.168.52.60 38168 222
SSH_CONNECTION=192.168.52.60 38168 192.168.52.8 222
SSH_TTY=/dev/pts/0
TEMP=/opt/tmp
TERM=xterm
TERMINFO=/opt/share/terminfo
TMP=/opt/tmp
USER=root
root@Keenetic_Ultra ~# 

root@Keenetic_Ultra ~# sed -i -e 's,PATH /opt/sbin /opt/bin,PATH /opt/sbin /opt/bin /opt/usr/bin,' /opt/etc/fish/config.fish
root@Keenetic_Ultra ~# . /opt/etc/fish/config.fish 
root@Keenetic_Ultra ~# 

стало:


root@Keenetic_Ultra ~# env
HOME=/opt/root
LANG=en_US.UTF-8
LC_ALL=en_US.UTF-8
LOGNAME=root
PATH=/opt/sbin:/opt/bin:/opt/usr/bin:/usr/sbin:/usr/bin:/sbin:/bin
PWD=/opt/root
SHELL=/opt/bin/sh
SHLVL=2
SSH_CLIENT=192.168.52.60 38168 222
SSH_CONNECTION=192.168.52.60 38168 192.168.52.8 222
SSH_TTY=/dev/pts/0
TEMP=/opt/tmp
TERM=xterm
TERMINFO=/opt/share/terminfo
TMP=/opt/tmp
USER=root
root@Keenetic_Ultra ~# 

получаем:


root@Keenetic_Ultra ~# opkg upgrade
Upgrading busybox on root from 0.0.0 to 1.31.0-1...
Downloading http://bin.entware.net/mipselsf-k3.4/busybox_1.31.0-1_mipsel-3.4.ipk
Upgrading poorbox on root from 0.0.0 to 1.31.0-1...
Downloading http://bin.entware.net/mipselsf-k3.4/keenetic/poorbox_1.31.0-1_mipsel-3.4_kn.ipk
Configuring busybox.
Warning: '/opt/bin/find' is already exists, skipping.
Warning: '/opt/bin/xargs' is already exists, skipping.
Warning: '/opt/bin/grep' is already exists, skipping.
Configuring poorbox.
root@Keenetic_Ultra ~# 

 

 

 

Edited by TheBB
upd
  • Thanks 6
Link to comment
Share on other sites

  • 6 months later...
  • 3 months later...
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...