Jump to content

TheBB

Moderators
  • Posts

    2,410
  • Joined

  • Last visited

  • Days Won

    51

Everything posted by TheBB

  1. удалить старый (php7) opkg list-installed | grep ^php7 | cut -d' ' -f1 | xargs opkg remove --force-depends установить новый
  2. Происходит следующее: ser2net имеет 2 конфига, старого формата - "/opt/etc/ser2net.conf" и нового - "/opt/etc/ser2net/ser2net.yaml", приоритет за новым. При старте, если есть нов. формата и не указано иного, ser2net цепляет его ("/opt/etc/ser2net/ser2net.yaml"). ~ # strace -ffff -vvvv -e openat ser2net -u -P /opt/var/run/ser2net.pid openat(AT_FDCWD, "/opt/lib/tls/aarch64/libyaml-0.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/opt/lib/tls/libyaml-0.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/opt/lib/aarch64/libyaml-0.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/opt/lib/libyaml-0.so.2", O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, "/opt/lib/libgensio.so.0", O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, "/opt/lib/libnsl.so.1", O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, "/opt/lib/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, "/opt/lib/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, "/opt/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, "/opt/etc/ser2net/ser2net.yaml", O_RDONLY) = 6 <= oops! openat(AT_FDCWD, "/opt/etc/localtime", O_RDONLY|O_CLOEXEC) = 6 strace: Process 22977 attached strace: Process 22978 attached [pid 22976] +++ exited with 0 +++ [pid 22978] openat(AT_FDCWD, "/opt/var/run/ser2net.pid", O_WRONLY|O_CREAT|O_TRUNC, 0666 <unfinished ...> [pid 22977] +++ exited with 0 +++ ... ~ # ser2net -u -P /opt/var/run/ser2net.pid -c /opt/etc/ser2net.conf ser2net:WARNING: Using old config file format, this will go away soon. Please switch to the yaml-based format. ~ # "под капотом" ~ # strace -ffff -vvvv -e openat ser2net -u -P /opt/var/run/ser2net.pid -c /opt/etc/ser2net.conf openat(AT_FDCWD, "/opt/lib/tls/aarch64/libyaml-0.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/opt/lib/tls/libyaml-0.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/opt/lib/aarch64/libyaml-0.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/opt/lib/libyaml-0.so.2", O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, "/opt/lib/libgensio.so.0", O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, "/opt/lib/libnsl.so.1", O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, "/opt/lib/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, "/opt/lib/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, "/opt/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, "/opt/etc/ser2net.conf", O_RDONLY) = 6 <= oops! ser2net:WARNING: Using old config file format, this will go away soon. Please switch to the yaml-based format. openat(AT_FDCWD, "/opt/etc/localtime", O_RDONLY|O_CLOEXEC) = 6 strace: Process 23056 attached [pid 23055] +++ exited with 0 +++ strace: Process 23057 attached [pid 23056] +++ exited with 0 +++ openat(AT_FDCWD, "/opt/var/run/ser2net.pid", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 0 ... Что делать, теперь решайте сами... )))
  3. http://bin.entware.net/aarch64-k3.10/test/airprint/ http://bin.entware.net/mipselsf-k3.4/test/airprint/ http://bin.entware.net/mipssf-k3.4/test/airprint/ 1. установить пакет: opkg install airprint остальные зависят от модели устройства (напр., для SCX-4220 - `opkg install splix`) 2. добавить группy для avahi echo "nogroup:x:65535:" >> /opt/etc/group 3. для настройки через web отредактировать файл "/opt/etc/cups/cupsd.conf": в строке "Listen localhost:631" удалить запись "localhost" ( Listen localhost:631 => Listen 631) добавить в конец каждой секции " <Location />" и "<Location /admin>" - "Allow @Local" 4. заметить стартовый скрипт "/opt/etc/init.d/S42avahi-daemon", присвоив другой номер (чтоб не переписывался при переустановке), типа; 5. запустить сервисы /opt/etc/init.d/S20dbus start /opt/etc/init.d/S42avahi-daemon start /opt/etc/init.d/S60cupsd start и настроить устройство через "морду" IP:631 6. создать 2 (два) файла (или забрать готовые) 7. забрать генератор (curl/wget/копипаста) https://raw.github.com/tjfontaine/airprint-generate/master/airprint-generate.py 8. создать файл сервиса устройства для avahi python airprint-generate.py -d /opt/etc/avahi/services/ 9. перезапустить сервисы /opt/etc/init.d/S42avahi-daemon restart /opt/etc/init.d/S60cupsd restart 10. пытать ипон(ц)а --- из неявного: имя хоста должно быть с суффиксом .local
  4. Это не инструкция, а демонстрация. Инструкция тут (с поправкой на отсутствие "Люськи" и прочие Entware specifics) Опять же, демонстрация (не забываем экранировать спецсимволы) ~ # ~ # uhttpd -m superpass $1$$gIQJltLOuZboYpWcWhc5U0 ~ # ~ # echo "/ext-ui/:root:\$1\$\$gIQJltLOuZboYpWcWhc5U0" > /opt/etc/httpd.conf ~ # ~ # /opt/etc/init.d/S80uhttpd restart Shutting down uhttpd... done. Starting uhttpd... done. ~ #
  5. скорее всего на конфиги, изменённые пользователем (защита от перезаписи) если лог не создавать (перенаправление вывода в файл), его нет.
  6. Настраивать не пробовали? ~ # uhttpd --help ... -r string Specify basic auth realm ... ~ # ~ # ~ # echo "/:adminweb:passwd" > /opt/etc/httpd.conf ~ # ~ # cat /opt/etc/uhttpd.conf ... OPTS="-p $ADDR:$PORT -h $DOCROOT -i $PHP -r /opt/etc/httpd.conf" ~ # ~ # /opt/etc/init.d/S80uhttpd restart Shutting down uhttpd... done. Starting uhttpd... done. ~ #
  7. Вариант №2 (внимательно следим за руками) ~ # ~ # ln -sf /opt/lib/python3.10/site-packages/ycast/__main__.py /opt/bin/ycast ~ # ~ # sed -i -e 's,^#!.*python,#!/opt/bin/python,' /opt/bin/ycast ~ # ~ # chmod +x /opt/bin/ycast ~ # #!/bin/sh ENABLED=yes PROCS=ycast ARGS="-p 8888" PREARGS="" DESC="YCast" PATH=/opt/sbin:/opt/bin:/opt/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin . /opt/etc/init.d/rc.func ~ # ~ # /opt/etc/init.d/S80ycast status Checking YCast... dead. ~ # ~ # /opt/etc/init.d/S80ycast start Starting YCast... done. ~ # ~ # /opt/etc/init.d/S80ycast status Checking YCast... alive. ~ # ~ # /opt/etc/init.d/S80ycast stop Checking YCast... alive. Shutting down ycast... done. ~ # ~ # /opt/etc/init.d/S80ycast status Checking YCast... dead. ~ # ~ # /opt/etc/init.d/S80ycast start Starting YCast... done. ~ # ~ # /opt/etc/init.d/S80ycast restart Shutting down ycast... done. Starting YCast... done. ~ #
  8. Скорее, много лишнего. В оригинале: ~ # ~ # ls -al /opt/lib/libcrypto* -rw-r--r-- 1 root root 3502296 Mar 17 21:18 /opt/lib/libcrypto.so.3 ~ # ls -al /opt/lib/libssl* -rw-r--r-- 1 root root 601480 Mar 17 21:18 /opt/lib/libssl.so.3 ~ # Переустанавливать всё, что зависит от (lib)openssl.
  9. Если ЭТО всё, ничего удивительного нет ))) ~ # ~ # /opt/etc/init.d/S81ycast start Service start ~ # ~ # pgrep -alf ycast 23142 python3 -m ycast -p 8888 ~ # ~ # /opt/etc/init.d/S81ycast stop Service stop ~ # ~ # pgrep -alf ycast ~ # функционал накручивайте сами #!/bin/sh PATH=/opt/bin:/opt/sbin:/sbin:/bin:/usr/sbin:/usr/bin start() { python3 -m ycast -p 8888 > /dev/null 2>&1 & } stop() { kill $(pgrep -of ycast) } case "$1" in start) start && echo "Service start" ;; stop) stop && echo "Service stop" ;; *) echo "Usage: $0 {start|stop}" ;; esac
  10. Не актуально, уже добавлено в пакет "libopenssl".
  11. Всё было и не раз - переустановка пакетов (ещё один вариант): `for p in $(grep -B2 'libopenssl' /opt/lib/opkg/status | grep ^Pack | cut -d' ' -f2 | grep -v ^libopenssl); do opkg install --force-reinstall $p; done`
  12. bump to 2023.3.4 (aarch64||mipsel) (прим. - отключить "zram") 1 добавить "потеряху", иначе cryptography "прикажет долго жить" 2 снести pyroute2 и накатить новый (все вопросы (можно нецензурно) сюды (на кой порезал, на кой слепил обратно, ...)) opkg list-installed | grep pyroute2 | cut -d' ' -f1 | xargs opkg remove --force-depends opkg install python3-pyroute2 --- add --- п.1 не актуален, пакет "libopenssl" обновлён.
  13. На данный момент, до полного завершения синхронизации с OpenWrt и выгрузки пакетов, сие не представляется возможным.
  14. Забацать скрипт автофикса. Типа: от простого... #!/bin/sh do_start() { if ! grep -q '^127.0.0.3 localhost' /etc/hosts; then echo '127.0.0.3 localhost' >> /etc/hosts fi } case "$1" in start) do_start ;; stop|restart|reload|status) return 0 ;; *) printf "Usage: $0 {start}\n" exit 1 ;; esac exit 0 * 127.0.0.3 localhost - для демонстрации работы, заменить на нужные данные. ... до "навороченного" (!!! не готовое решение, а пример !!!)
  15. ~ # ls -1 /opt/lib/opkg/info/*.control | wc -l 751 ~ # "ахтунг", 751 файл, откуда стока набралось... ~ # ~ # cat /opt/etc/passwd-draft root:$1$qIcnZlor$aUMGvS6VL7brlpSxLZO1y0:0:0:Root:/opt/root:/opt/bin/sh nobody:*:65534:65534:user "nobody"::/opt/bin/nologin ~ # ~ # cat /opt/etc/group-draft root:*:0:root nobody:*:65534:nobody ~ # юзверей и групп маловато будет для такого ~ # ~ # time sh ./ug.sh Adding a new ntp group with an ID 123 Adding a new ntp user with an ID 123 Adding a new domoticz group with an ID 6144 Adding a new domoticz user with an ID 6144 Adding a new git group with an ID 382 Adding a new git user with an ID 382 Adding a new icecast group with an ID 87 Adding a new icecast user with an ID 87 Adding a new mosquitto group with an ID 200 Adding a new mosquitto user with an ID 200 The mosquitto group already exists The mosquitto user already exists Adding a new mpd group with an ID 65536 Adding a new mpd user with an ID 65536 Adding a new sshd group with an ID 22 Adding a new sshd user with an ID 22 Adding a new pulse group with an ID 51 Adding a new pulse user with an ID 51 Adding a new transmission group with an ID 224 Adding a new transmission user with an ID 224 real 0m 1.22s user 0m 0.71s sys 0m 0.42s ~ # шустро, однако. ~ # ~ # cat /opt/etc/passwd-draft root:$1$qIcnZlor$aUMGvS6VL7brlpSxLZO1y0:0:0:Root:/opt/root:/opt/bin/sh nobody:*:65534:65534:user "nobody"::/opt/bin/nologin ntp:x:123:123:user "ntp"::/opt/bin/false domoticz:x:6144:6144:user "domoticz"::/opt/bin/false git:x:382:382:user "git"::/opt/bin/false icecast:x:87:87:user "icecast"::/opt/bin/false mosquitto:x:200:200:user "mosquitto"::/opt/bin/false mpd:x:65536:65536:user "mpd"::/opt/bin/false sshd:x:22:22:user "sshd"::/opt/bin/false pulse:x:51:51:user "pulse"::/opt/bin/false transmission:x:224:224:user "transmission"::/opt/bin/false ~ # ~ # cat /opt/etc/group-draft root:*:0:root nobody:*:65534:nobody ntp:x:123: domoticz:x:6144: git:x:382: icecast:x:87: mosquitto:x:200: mpd:x:65536: sshd:x:22: pulse:x:51: transmission:x:224: ~ # ну, вот, другое дело. и исчё разок: ~ # ~ # time sh ./ug.sh The ntp group already exists The ntp user already exists The domoticz group already exists The domoticz user already exists The git group already exists The git user already exists The icecast group already exists The icecast user already exists The mosquitto group already exists The mosquitto user already exists The mosquitto group already exists The mosquitto user already exists The mpd group already exists The mpd user already exists The sshd group already exists The sshd user already exists The pulse group already exists The pulse user already exists The transmission group already exists The transmission user already exists real 0m 1.08s user 0m 0.65s sys 0m 0.36s ~ # больше не хотить... велокостыль:
  16. Я бы не сказал, что он много "жрёт"... )))
  17. https://github.com/cloudflare/goflow#run Не? В стартовых скриптах оно есть... ~ # grep ^ARG /opt/etc/init.d/S99goflow ARGS="-kafka=false -nfl=false -sflow=false" ~ #
  18. ~ # opkg list-upgradable grafana - 9.3.2-1 - 9.3.6-1 ~ #
×
×
  • Create New...