echo"Info: Checking for prerequisites and creating folders..."
if [ -d /opt ] then echo"Warning: Folder /opt exists!" else mkdir /opt fi for folder in bin etc/init.d lib/opkg sbin share tmp usr var/log var/lock var/run do if [ -d "/opt/$folder" ] then echo"Warning: Folder /opt/$folder exists!" echo"Warning: If something goes wrong please clean /opt folder and try again." else mkdir -p /opt/$folder fi done
echo"Info: Basic packages installation..." /opt/bin/opkg update /opt/bin/opkg install entware-opt if [ ! -f /opt/usr/lib/locale/locale-archive ] then wget http://pkg.entware.net/binaries/other/locale-archive.2.23 -O /opt/usr/lib/locale/locale-archive fi
# from Entware (2018) # now try create symlinks - it is a std installation if [ -f /etc/passwd ] then ln -sf /etc/passwd /opt/etc/passwd fi
if [ -f /etc/group ] then ln -sf /etc/group /opt/etc/group fi
if [ -f /etc/shells ] then ln -sf /etc/shells /opt/etc/shells fi
if [ -f /etc/shadow ] then ln -sf /etc/shadow /opt/etc/shadow fi
if [ -f /etc/gshadow ] then ln -sf /etc/gshadow /opt/etc/gshadow fi
if [ -f /etc/localtime ] then ln -sf /etc/localtime /opt/etc/localtime fi # Upgrading to Entware opkg update opkg upgrade
echo"Info: Congratulations!" echo"Info: If there are no errors above then Entware-ng was successfully initialized." echo"Info: Add /opt/bin & /opt/sbin to your PATH variable" echo"Info: Add '/opt/etc/init.d/rc.unslung start' to startup script for Entware-ng services to start" echo"Info: Found a Bug? Please report at https://github.com/Entware-ng/Entware-ng/issues"
4、执行./entware_install.sh后,验证是否安装成功
1 2 3 4 5 6 7 8 9
#进入/opt/bin 目录 cd /opt/bin #执行指令 ./opkg update #运行效果 Downloading http://bin.entware.net/armv7sf-k2.6/Packages.gz Updated list of available packages in /opt/var/opkg-lists/entware