Code Monkey home page Code Monkey logo

Comments (17)

ValdikSS avatar ValdikSS commented on June 18, 2024 4

Entware is now available on Huawei portable LTE routers with modified firmware.
E5372: https://4pda.ru/forum/index.php?s=&showtopic=618520&view=findpost&p=64916777
E5770: https://4pda.ru/forum/index.php?s=&showtopic=818849&view=findpost&p=64185933

It uses alternative installation. Entware busybox ash is available with 'entware shell' command to prevent PATH and LD_LIBRARY_PATH mixing.
I had to touch /opt/usr/lib/locale/locale-archive before installation to prevent locale-gen from running, since it will be killed by oom-killer with the installation script, since the device have only 15-16 MB of free RAM. I download binary locale-archive later, after the installation.

from entware.

ValdikSS avatar ValdikSS commented on June 18, 2024

Simple workaround is to remove /opt/etc/passwd after opkg install entware-opt in installation script.

from entware.

zyxmon avatar zyxmon commented on June 18, 2024

Please read the wiki - https://github.com/Entware/Entware/wiki/Alternative-install-vs-standard

from entware.

ValdikSS avatar ValdikSS commented on June 18, 2024

@zyxmon I'm talking about alternative installation, which currently rewrites original /etc/passwd (not /opt/etc/passwd) due to bug. It should not do that.

from entware.

zyxmon avatar zyxmon commented on June 18, 2024

It should not do that.

Sure - what script you are talking about?

from entware.

zyxmon avatar zyxmon commented on June 18, 2024

Yes - I'll check it.

from entware.

ValdikSS avatar ValdikSS commented on June 18, 2024

http://bin.entware.net/armv7sf-k2.6/installer/alternative.sh, from the wiki. After opkg install entware-opt /opt/etc/passwd is symlinked to /etc/passwd, and later on the data from /opt/etc/passwd.1 gets copied to /opt/etc/passwd, and eventually rewrites /etc/passwd.

from entware.

zyxmon avatar zyxmon commented on June 18, 2024

Yes I see - script used to upgrade Entware-ng (which is always standard) is executed for alternative armv7-k2.6 installation (package entware-upgrade).
I'll fix it. Thanks. It looks like root/12345 (/opt/etc/passwd) is rewritten, /etc/passwd is not affected.

Завтра исправлю на свежую голову. Пока считаю, что ошибка есть, но описана неверно.

from entware.

ValdikSS avatar ValdikSS commented on June 18, 2024

Скрипт ведет себя именно так, как я написал в первом сообщении — альтернативный инстраллятор переписывает /etc/passwd во время установки. Перед выполнением кода cp -f /opt/etc/passwd.1 /opt/etc/passwd из инсталлятора, /opt/etc/passwd является симлинком на /etc/passwd, и выполнение cp перезаписывает данные /etc/passwd.

from entware.

zyxmon avatar zyxmon commented on June 18, 2024

Выполнение cp переписывает /opt/etc/passwd, после cp /opt/etc/passwd уже не симлинк, а нормальный файл, причем тот, что нужно.
У Вас что за устройство и что за прошивка?

from entware.

ValdikSS avatar ValdikSS commented on June 18, 2024

Команда cp всегда следует симлинку, и перезаписывает файл, на который ссылается симлинк. Я только что проверил это и на Fedora 27 с coreutils, и на busybox.
У меня нестандартное Linux-окружение, собранное с Android NDK и Bionic, и с Android init-системой.

from entware.

zyxmon avatar zyxmon commented on June 18, 2024

Поведение команды cp в openwrt и tomato другое. Все зависит от флага по умолчанию
-P - preserve symlinks;
-H - follow symlinks.
http://man7.org/linux/man-pages/man1/cp.1.html

Поэтому при тестировании на Tomato проблема не обнаружилась. А она есть.

from entware.

zyxmon avatar zyxmon commented on June 18, 2024

Thanks for reporting!

from entware.

zyxmon avatar zyxmon commented on June 18, 2024

http://bin.entware.net/armv7sf-k2.6/installer/alternative.sh - was fixed.
This is specific bug only for this arch, that comes from entware-ng.

from entware.

ValdikSS avatar ValdikSS commented on June 18, 2024

Thanks!

from entware.

zyxmon avatar zyxmon commented on June 18, 2024

BTW (busybox sources).

/* coreutils 6.9 compat:
         * by default, "cp" derefs symlinks (creates regular dest files),
         * but "cp -R" does not. We switch off deref if -r or -R (see above).
         * However, "cp -RL" must still deref symlinks: */

Thanks again. Installation script now removes symlinks, that were created for standard install by one of the packages before copying regular files.

from entware.

ryzhovau avatar ryzhovau commented on June 18, 2024

@ValdikSS glad you are using Entware:)

from entware.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.