#!/bin/sh find_base(){ HDD_MOUNT=`/sbin/getcfg Public path -f /etc/config/smb.conf` local log_tool="/sbin/log_tool -t2 -uSystem -p127.0.0.1 -mlocalhost -a" if [ -e "$HDD_MOUNT" ]; then if [ -z "$QINSTALL_PATH" ]; then BASE_GROUP="/share/HDA_DATA /share/HDB_DATA /share/HDC_DATA /share/HDD_DATA /share/HDE_DATA /share/HDF_DATA /share/HDG_DATA /share/HDH_DATA /share/HDI_DATA /share/HDJ_DATA /share/HDK_DATA /share/HDL_DATA /share/MD0_DATA /share/MD1_DATA /share/MD2_DATA /share/MD3_DATA" publicdir=`/sbin/getcfg Public path -f /etc/config/smb.conf` if [ ! -z $publicdir ] && [ -d $publicdir ];then publicdirp1=`/bin/echo $publicdir | /bin/cut -d "/" -f 2` publicdirp2=`/bin/echo $publicdir | /bin/cut -d "/" -f 3` publicdirp3=`/bin/echo $publicdir | /bin/cut -d "/" -f 4` if [ ! -z $publicdirp1 ] && [ ! -z $publicdirp2 ] && [ ! -z $publicdirp3 ]; then [ -d "/${publicdirp1}/${publicdirp2}/Public" ] && QPKG_BASE="/${publicdirp1}/${publicdirp2}" fi fi # Determine BASE installation location by checking where the Public folder is. if [ -z $QPKG_BASE ]; then for datadirtest in $BASE_GROUP; do [ -d $datadirtest/Public ] && QPKG_BASE="/${publicdirp1}/${publicdirp2}" done fi if [ -z $QPKG_BASE ] ; then echo "The Public share not found." return 1 fi QPKG_INSTALL_PATH="${QPKG_BASE}/.qpkg" QPKG_DIR="${QPKG_INSTALL_PATH}/${QPKG_NAME}" else if [ -e "$QINSTALL_PATH" ]; then QPKG_INSTALL_PATH="${QINSTALL_PATH}" QPKG_DIR="${QINSTALL_PATH}/${QPKG_NAME}" else if [ -x "/usr/local/sbin/notify" ]; then /usr/local/sbin/notify send -A A039 -C C001 -M 50 -l error -t 3 "[{0}] {1} install failed due to QTS application install volume not found." "App Center" "Entware-alt" set_progress_fail exit else /sbin/log_tool -t2 -uSystem -p127.0.0.1 -mlocalhost -a "[App Center] Failed to install Entware-alt. The selected installation volume is missing." set_progress_fail fi exit fi fi return 0 else if [ -x "/usr/local/sbin/notify" ]; then /usr/local/sbin/notify send -A A039 -C C001 -M 50 -l error -t 3 "[{0}] {1} install failed due to QTS application install volume not found." "App Center" "Entware-alt" set_progress_fail exit else /sbin/log_tool -t2 -uSystem -p127.0.0.1 -mlocalhost -a "[App Center] Failed to install Entware-alt. The selected installation volume is missing." set_progress_fail fi exit fi } /bin/echo "Install QNAP package on TS-NAS..." /bin/grep "/mnt/HDA_ROOT" /proc/mounts >/dev/null 2>&1 || exit 1 find_base _EXTRACT_DIR="$QPKG_INSTALL_PATH/.tmp" /bin/mkdir -p $_EXTRACT_DIR || exit 1 script_len=3061 /bin/dd if="${0}" bs=$script_len skip=1 | /bin/tar -xO | /bin/tar -xzv -C $_EXTRACT_DIR || exit 1 offset=$(/usr/bin/expr $script_len + 20480) /bin/dd if="${0}" bs=$offset skip=1 | /bin/cat | /bin/dd bs=1024 count=4 of=$_EXTRACT_DIR/data.tar.gz || exit 1 [ -f /usr/local/bin/python ] && /usr/local/bin/python -c "with open('$_EXTRACT_DIR/data.tar.gz', 'rw+') as f: f.seek(3741); f.truncate()" offset=$(/usr/bin/expr $offset + 3741) ( cd $_EXTRACT_DIR && /bin/sh qinstall.sh || echo "Installation Abort." ) /bin/rm -fr $_EXTRACT_DIR && exit 10 exit 1 control.tar.gz0000644000000000000000000002564413605073771014574 0ustar adminadministrators_Xv[Z;IUw?QrHv@j O?;uwwoozpneW||n9e{!(CS+|j+Y/(=!bXCg2v=gM٬mm@]!ZmtFjM j뙠YwPO;cRkr.pGM\" e׃3״شpL`JI@O1qPϰIwqn[#ҲF)66Sjk69 ȱ x`^jAG.磠v "0nڦ q8l x& hd)uMPC;u0) ]ZM)YtMg8 Z#9z==` rLln[Np FFhGVs?nڍ~wz:ZoЬ [Ztn(ҧol @e|A>pfdj\PPZAFlv !F"|M1q`\z,]&6ICI6FIvw+=Ta;Uw+d،sslf3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