Silas Mariusz

rm -rf /
Help us, GOD!
5 Kwiecień 2008
10 199
4 708
405
Odznaki
205
Nowy Sącz
forum.qnap.net.pl
QNAP
TS-x77
Ethernet
1 GbE
Poz.
6
 
Silas Mariusz opublikował nowe elementy w zasobach:

Entware-ng (Qnapware) (wersja 0.97) - Menadżer instalacji dodatkowych Linux'owych aplikacji skompilowanych dla serwerów QNAP

Entware is a lightweight package management system designed for embedded devices. Entware consists of well over 1800 binaries for everyday command line usage. Entware is an maintained replacement for Entware, Optware, Qnapware and Itsy OPKG.

Dla serwerów QNAP z procesorem Intel/AMD:
  • z oprogramowaniem 4.2 lub starszym: wersja TS-NASX86
  • z oprogramowaniem 4.3 lub nowszym: wersja TS-NASX86_64

Czytaj więcej...
 
Mam ciekawy przypadek na jednym z urządzeń: Jest podpięte repo qnapclub, użytkownik pobrał Entware i zainstalował, nie było komunikatów o błędach. Przy próbie wykonania "opkg update" zwraca "opkg: command not found". Urządzenie to TS-251A z FW 4.2.2. Na moim TS-251 działa poprawnie. Co może być nie tak?

Dodatkowe info:
Wywołanie z lokalizacji /opt/bin/ ./opkg update działa poprawnie.
 
Instalacja z debugowaniem.

Kod:
sh -x Entware-ng_0.97.qpkg
+ /bin/echo 'Install QNAP package on TS-NAS...'
Install QNAP package on TS-NAS...
+ /bin/grep /mnt/HDA_ROOT /proc/mounts
+ _EXTRACT_DIR=/mnt/HDA_ROOT/update_pkg/tmp
+ /bin/mkdir -p /mnt/HDA_ROOT/update_pkg/tmp
++ /usr/bin/basename Entware-ng_0.97.qpkg
+ /bin/echo 'SYS_QPKG_FILENAME="Entware-ng_0.97.qpkg"'
+ script_len=723
+ /bin/dd if=Entware-ng_0.97.qpkg bs=723 skip=1
+ /bin/tar -xzv -C /mnt/HDA_ROOT/update_pkg/tmp
33+1 records in
33+1 records out
+ /bin/tar -xO
./
./qinstall.sh
./package_routines
./qpkg.cfg
++ /usr/bin/expr 723 + 20480
+ offset=21203
+ /bin/dd if=Entware-ng_0.97.qpkg bs=21203 skip=1
+ /bin/dd bs=1024 count=4 of=/mnt/HDA_ROOT/update_pkg/tmp/data.tar.gz
0+1 records in
0+1 records out
+ /bin/cat
3+1 records in
3+1 records out
++ /usr/bin/expr 21203 + 3742
+ offset=24945
+ cd /mnt/HDA_ROOT/update_pkg/tmp
+ /bin/sh qinstall.sh
Sym-link /opt ...
Info: Opkg package manager deployment...
Info: Basic packages installation...
Downloading http://pkg.entware.net/binaries/x86-64/Packages.gz.
Updated list of available packages in /opt/var/opkg-lists/packages.
Installing entware-opt (222108-5) to root...
Downloading http://pkg.entware.net/binaries/x86-64/entware-opt_222108-5_x86-64.ipk.
Installing libc (2.23-6) to root...
Downloading http://pkg.entware.net/binaries/x86-64/libc_2.23-6_x86-64.ipk.
Installing libgcc (6.3.0-6) to root...
Downloading http://pkg.entware.net/binaries/x86-64/libgcc_6.3.0-6_x86-64.ipk.
Installing libssp (6.3.0-6) to root...
Downloading http://pkg.entware.net/binaries/x86-64/libssp_6.3.0-6_x86-64.ipk.
Installing librt (2.23-6) to root...
Downloading http://pkg.entware.net/binaries/x86-64/librt_2.23-6_x86-64.ipk.
Installing libpthread (2.23-6) to root...
Downloading http://pkg.entware.net/binaries/x86-64/libpthread_2.23-6_x86-64.ipk.
Installing libstdcpp (6.3.0-6) to root...
Downloading http://pkg.entware.net/binaries/x86-64/libstdcpp_6.3.0-6_x86-64.ipk.
Installing ldconfig (2.23-6) to root...
Downloading http://pkg.entware.net/binaries/x86-64/ldconfig_2.23-6_x86-64.ipk.
Installing findutils (4.6.0-1) to root...
Downloading http://pkg.entware.net/binaries/x86-64/findutils_4.6.0-1_x86-64.ipk.
Installing terminfo (6.0-1c) to root...
Downloading http://pkg.entware.net/binaries/x86-64/terminfo_6.0-1c_x86-64.ipk.
Installing locales (2.23-6) to root...
Downloading http://pkg.entware.net/binaries/x86-64/locales_2.23-6_x86-64.ipk.
Installing opkg (2011-04-08-9c97d5ec-17) to root...
Downloading http://pkg.entware.net/binaries/x86-64/opkg_2011-04-08-9c97d5ec-17_x86-64.ipk.
Configuring libgcc.
Configuring libc.
Configuring libssp.
Configuring libpthread.
Configuring librt.
Configuring terminfo.
Configuring ldconfig.
Configuring locales.
Entware uses separate locale-archive file independent from main system
Creating locale archive - /opt/usr/lib/locale/locale-archive
Adding en_EN.UTF-8
Adding ru_RU.UTF-8
You can download locale sources from http://pkg.entware.net/sources/i18n_glib223.tar.gz
You can add new locales to Entware using /opt/bin/localedef.new
Configuring opkg.
Configuring libstdcpp.
Configuring findutils.
Configuring entware-opt.
Updating /opt/etc/ld.so.cache... done.
Link service start/stop script: Entware-ng.sh
Set QPKG information in /etc/config/qpkg.conf
Enable Entware-ng/opkg
[App Center] Entware-ng 0.97 installation succeeded.
[App Center] Entware-ng enabled.
+ /bin/rm -fr /mnt/HDA_ROOT/update_pkg/tmp
+ exit 10
[/share/Public] # opkg
-sh: opkg: command not found
 
To co zwiera /etc/profile
Kod:
# cat /etc/profile
# ~/.bashrc: executed by bash(1) for non-login interactive shells.

export PATH=\
/bin:\
/sbin:\
/usr/bin:\
/usr/sbin:\
/usr/bin/X11:\
/usr/local/sbin

# If running interactively, then:
if [ "$PS1" ]; then

    if [ "$BASH" ]; then
        export PS1="[\u@\h \W]\\$ "
        alias ll='/bin/ls -laFh'
        alias ls='/bin/ls -F'
        export LS_COLORS='no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.jpg=01;35:*.jpeg=01;35:*.png=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.mpg=01;35:*.mpeg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:';
    else
      if [ "`id -u`" -eq 0 ]; then
        export PS1='# '
      else
        export PS1='$ '
      fi
    fi

    export USER=`id -un`
    export LOGNAME=$USER
    export HOSTNAME=`/bin/hostname`
    export HISTSIZE=1000
    export HISTFILESIZE=1000
    export PAGER='/bin/more '
    export EDITOR='/bin/vi'
    export INPUTRC=/etc/inputrc
    export DMALLOC_OPTIONS=debug=0x34f47d83,inter=100,log=logfile
    export LANG=en_US.UTF-8
    export LC_ALL=en_US.UTF-8
    export LC_CTYPE=en_US.UTF-8

    ### Some aliases
    alias ps2='ps facux '
    alias ps1='ps faxo "%U %t %p %a" '
    alias af='ps af'
    alias cls='clear'
    alias df='df -h'
    alias indent='indent -bad -bap -bbo -nbc -br -brs -c33 -cd33 -ncdb -ce -ci4 -cli0 -cp33 -cs -d0 -di1 -nfc1 -nfca -hnl -i4 -ip0 -l75 -lp -npcs -npsl -nsc -nsob -nss -ts4 '
    #alias bc='bc -l'
    alias minicom='minicom -c on'
    alias calc='calc -Cd '
    alias bc='calc -Cd '
fi;
export PATH=${PATH}:/usr/local/bin
alias smb3enable='/etc/init.d/smb2_protocol.sh enable 3'
alias smb21enable='/etc/init.d/smb2_protocol.sh enable 21'
alias smb2enable='/etc/init.d/smb2_protocol.sh enable'
alias smb2disable='/etc/init.d/smb2_protocol.sh disable'
alias smb2status='/etc/init.d/smb2_protocol.sh status'
alias usb_qa_status='/etc/init.d/smb2_protocol.sh usb_qa_status'
PATH=/share/CACHEDEV1_DATA/.qpkg/ubuntu-hd/bin:/share/CACHEDEV1_DATA/.qpkg/ubuntu-hd/sbin:$PATH
PATH=/share/CACHEDEV1_DATA/.qpkg/container-station/bin:/share/CACHEDEV1_DATA/.qpkg/container-station/sbin:$PATH

wykonanie source /opt/etc/profile powoduje aktywację polecenia opkg, niestety tylko na aktualną sesję.
Jak już wspomniałem, problem występuje na TS-251A
 
Pokaż mi output z:
Bash:
cat /share/CACHEDEV1_DATA/.qpkg/Entware-ng/Entware-ng.sh

Czy jest w nim:
Bash:
	# adding opkg apps into system path ...
	/bin/cat /root/.profile | /bin/grep "/opt/etc/profile" 1>>/dev/null 2>>/dev/null
	[ $? -ne 0 ] && /bin/echo "source /opt/etc/profile" >> /root/.profile
?

Powinno być w sekcji start:
Bash:
case "$1" in
  start)
  if [ `/sbin/getcfg ${QPKG_NAME} Enable -u -d FALSE -f /etc/config/qpkg.conf` = UNKNOWN ]; then
  	/sbin/setcfg ${QPKG_NAME} Enable TRUE -f /etc/config/qpkg.conf
  elif [ `/sbin/getcfg ${QPKG_NAME} Enable -u -d FALSE -f /etc/config/qpkg.conf` != TRUE ]; then
  	_exit  "${QPKG_NAME} is disabled."
  fi

  /bin/echo "Enable Entware-ng/opkg"
	# sym-link $QPKG_DIR to /opt
	/bin/rm -rf /opt
	/bin/ln -sf $QPKG_DIR /opt
	# adding opkg apps into system path ...
	/bin/cat /root/.profile | /bin/grep "/opt/etc/profile" 1>>/dev/null 2>>/dev/null
	[ $? -ne 0 ] && /bin/echo "source /opt/etc/profile" >> /root/.profile
	# startup Entware-ng services
	/opt/etc/init.d/rc.unslung start
    ;;
 
Kod:
 cat /share/CACHEDEV1_DATA/.qpkg/Entware-ng/Entware-ng.sh
#!/bin/sh

RETVAL=0
QPKG_NAME="Entware-ng"

_exit()
{
    /bin/echo -e "Error: $*"
    /bin/echo
    exit 1
}

QPKG_DIR=$(/sbin/getcfg Entware-ng Install_Path -f /etc/config/qpkg.conf)

case "$1" in
  start)
  if [ `/sbin/getcfg ${QPKG_NAME} Enable -u -d FALSE -f /etc/config/qpkg.conf` = UNKNOWN ]; then
        /sbin/setcfg ${QPKG_NAME} Enable TRUE -f /etc/config/qpkg.conf
  elif [ `/sbin/getcfg ${QPKG_NAME} Enable -u -d FALSE -f /etc/config/qpkg.conf` != TRUE ]; then
        _exit  "${QPKG_NAME} is disabled."
  fi

  /bin/echo "Enable Entware-ng/opkg"
        # sym-link $QPKG_DIR to /opt
        /bin/rm -rf /opt
        /bin/ln -sf $QPKG_DIR /opt
        # adding opkg apps into system path ...
        /bin/cat /root/.profile | /bin/grep "source" 1>>/dev/null 2>>/dev/null
        [ $? -ne 0 ] && /bin/echo "source /opt/etc/profile" >> /root/.profile
        # startup Entware-ng services
        /opt/etc/init.d/rc.unslung start
    ;;
  stop)
        /bin/echo "Disable Entware-ng/opkg"
        /opt/etc/init.d/rc.unslung stop
        /bin/sed -i '/source \/opt\/etc\/profile/d' /root/.profile
        /bin/sync
        /bin/sleep 1
        ;;
  restart)
        $0 stop
        $0 start
        ;;
  *)
        echo "Usage: $0 {start|stop|restart}"
        exit 1
esac

exit $RETVAL

Cześć wpisów nie zgadza się z twoimi.
 
Kod:
cat /root/.profile
export PS1='[\w] # '
reset


# Hello from rtorrent
[ -f "/usr/bin/rtorrent/root/.profile" ] && source /usr/bin/rtorrent/root/.profile

Kod:
export
export DMALLOC_OPTIONS="debug=0x34f47d83,inter=100,log=logfile"
export EDITOR="/bin/vi"
export HISTFILESIZE="1000"
export HISTSIZE="1000"
export HOME="/root"
export HOSTNAME="MTJarea"
export INPUTRC="/etc/inputrc"
export LANG="en_US.UTF-8"
export LC_ALL="en_US.UTF-8"
export LC_CTYPE="en_US.UTF-8"
export LOGNAME="admin"
export LS_COLORS="no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.jpg=01;35:*.jpeg=01;35:*.png=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.mpg=01;35:*.mpeg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:"
export MAIL="/var/mail/admin"
export OLDPWD
export PAGER="/bin/more "
export PATH="/share/CACHEDEV1_DATA/.qpkg/container-station/bin:/share/CACHEDEV1_DATA/.qpkg/container-station/sbin:/share/CACHEDEV1_DATA/.qpkg/ubuntu-hd/bin:/share/CACHEDEV1_DATA/.qpkg/ubuntu-hd/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/bin/X11:/usr/local/sbin:/usr/local/bin"
export PS1="[\\w] # "
export PWD="/root"
export SHELL="/bin/sh"
export SHLVL="1"
export SSH_CLIENT="10.10.3.10 52586 26"
export SSH_CONNECTION="10.10.3.10 52586 10.10.3.50 26"
export SSH_TTY="/dev/pts/6"
export TERM="xterm"
export USER="admin"

I dodatkowo różnica w moim Entware.sh
Kod:
# adding opkg apps into system path ...
        /bin/cat /root/.profile | /bin/grep "source" 1>>/dev/null 2>>/dev/null
        [ $? -ne 0 ] && /bin/echo "source /opt/etc/profile" >> /root/.profile
 
Z jakiegoś powodu nie załadował się .profile z root. Możesz sprawdzic co będzie jeśli zmienisz w obu linijkach w pliku start/stop Entware /root/.profile na /etc/profile?
Mało tego Tobie w ogóle nie ładuje się nic z .profile bo nawet nie ma wzmianki o rtorrencie, który tam powinien zaladowac swoje sciezki.
 
Powiem szczerze, że teraz totalnie zgłupiałem: przed wczoraj właściciel odpalił na tym urządzeniu CointainerStation i LinuxStation. Niby wszystko było ok i Ubuntu 14.04 działało na TV jak trzeba, ale HD Station było ważniejsze. Wczoraj urządzenie się uruchomiło bez podniesienia interfejsów sieciowych (zarówno LAN jak i WiFi), Ubuntu na TV działało poprawnie, ale bez dostępu do sieci. NAS został brutalnie wyłączony, po ponownym włączeniu nieco dłużej się odpalał, CointainerStation i LinuxStation zostały usunięte. Podłączyłem się zdalnie i okazało się, że opkg działa poprawnie (!?), teraz mam dostęp bezpośredni do urządzenia i opkg działa i zachowuje się poprawnie po każdym nowym uruchomieniu.
 
Właśnie zrobiłem upgrade Enware-ng na TS-453A ale nie startuje dnsmasq. Pokazuje następujący błąd:

Kod:
dnsmasq: unsupported option (check that dnsmasq was compiled with DHCP/TFTP/DNSSEC/DBus support) at line 9 of /opt/etc/dnsmasq.conf
# dnsmasq -v
Dnsmasq version 2.78  Copyright (c) 2000-2017 Simon Kelley
Compile time options: IPv6 GNU-getopt no-RTC no-DBus no-i18n no-IDN no-DHCP no-Lua TFTP conntrack ipset auth no-DNSSEC no-ID loop-detect inotify

Czy można to jakoś obejść lub zrobić downgrade dnsmasq do poprzedniej wersji, która pracowała poprawnie?
 
mam pytanie Entware-Std i TS-x73A czy działa na tej serii? Jeśli tak to którą wersję wybrać do ściągnięcia?
1649088387401.webp
 

Użytkownicy znaleźli tą stronę używając tych słów:

  1. entware
  2. qnapware
  3. entware-std
  4. forum
  5. bashrc
  6. entware install
  7. Entware-ng_0.97a.qpkg
  8. entware dla intel
  9. Qnapware,
  10. entware download
  11. entware alt