Generic Installation Script

The generic script, by default a file named qinstall.sh, performs the installation or upgrade of an alreadyinstalled package in three steps, pre-install, install, and post-install.

In the pre-install phase, the base directory for the QPKG installation is located and system variables areassigned valid values, configuration files are handled, and the current status of the QPKG (enabled ordisabled) is stored to be able to restore it later. The specified service program is stopped and then anypackage specific pre-install code is run.

In the install phase the data package is extracted in the QPKG directory, configuration files restored, andthen any package specific install code is run.

In the post-install phase any QPKG icons are copied to the correct location, symbolic links for the serviceprogram are created, the QPKG is registered in \/etc\/config\/qpkg.conf, and then any package specific post-install code is run.

To replace the generic installation script with a different script the QDK_INSTALL_SCRIPT variable can beassigned the location of the script. The generic installation script includes several different system definitionsthat can be used in the package specific script (use them as if they were read-only with the only exceptionbeing SYS_QPKG_SERVICE_ENABLED , which could be changed if required).

SYS_EXTRACT_DIR

Path to directory with extracted files from QPKG packages. The value is assigned at run-time.SYS_HOSTNAMEHost name for system the QPKG is installed on.

SYS_CONFIG_DIR

Path to directory where configuration files are stored. Default is \/etc\/config

SYS_INIT_DIR

Path to directory where init-scripts are stored. Default is \/etc\/init.d

SYS_STARTUP_DIR

Path to directory with symbolic links to init-scripts that shall be run at system startup. Default is\/etc\/rcS.d

SYS_SHUTDOWN_DIR

Path to directory with symbolic links to init-scripts that shall be run at system shutdown. Default is\/etc\/rcK.d

SYS_RSS_IMG_DIR

Path to directory with icons for the web interface. Default is \/home\/httpd\/RSS\/imagesSYS_QPKG_BASEBase location. Always assigned the location of the volume with the Public share, for example,\/share\/MD0_DATA.

SYS_QPKG_INSTALL_PATH

Base location of QPKG installed packages. Same as $SYS_QPKG_BASE \/.qpkg

SYS_QPKG_DIR

Location of installed software. Same as $SYS_QPKG_INSTALL_PATH\/$QPKG_NAME

SYS_QPKG_DATA_FILE_GZIP

Location of gzip compressed tar package with the data files. Default .\/data.tar.gz

SYS_QPKG_DATA_FILE_BZIP2

Location of bzip2 compressed tar package with the data files. Default .\/data.tar.bz2

SYS_QPKG_DATA_FILE_7ZIP

Location of 7-zip compressed tar package with the data files. Default .\/data.tar.7z

SYS_QPKG_DATA_FILE

Location of the tar package with the data files. Assigned the value of eitherSYS_QPKG_DATA_FILE_GZIP, SYS_QPKG_DATA_FILE_BZIP2, or SYS_QPKG_DATA_FILE_7ZIPat runtime depending on what type of data archive that is included in the QPKG package.

SYS_QPKG_DATA_MD5SUM_FILE

Location of the optional file with the md5sum values. Default .\/md5sum

SYS_QPKG_DATA_CONFIG_FILE

Location of the optional file with configuration files. Default .\/conf.tar.gz

SYS_QPKG_CONFIG_FILE

Location of system-wide configuration file for all installed QPKG packages. Default value is$SYS_CONFIG_DIR \/qpkg.conf. The following field names can be used when accessing the configurationfile.

SYS_QPKG_CONF_FIELD_QPKGFILE, SYS_QPKG_CONF_FIELD_NAME,SYS_QPKG_CONF_FIELD_VERSION, SYS_QPKG_CONF_FIELD_ENABLE,SYS_QPKG_CONF_FIELD_DATE, SYS_QPKG_CONF_FIELD_SHELL,SYS_QPKG_CONF_FIELD_INSTALL_PATH, SYS_QPKG_CONF_FIELD_CONFIG_PATH,SYS_QPKG_CONF_FIELD_WEBUI, SYS_QPKG_CONF_FIELD_WEBPORT,SYS_QPKG_CONF_FIELD_SERVICEPORT, SYS_QPKG_CONF_FIELD_SERVICE_PIDFILE , andSYS_QPKG_CONF_FIELD_AUTHOR

SYS_QPKG_SERVICE_ENABLED

Used to determine if the QPKG should be enabled or disabled after the installation\/upgrade is finished. Atan installation the value is always set to FALSE , while at an upgrade the current status of the QPKG isassigned to this variable before any of the package specific functions are executed. If set to TRUE then theservice program is also started at the end of the installation\/upgrade (if it fails to start then the status is setto disabled).

SYS_PUBLIC_SHARE

Name of public system share.

SYS_PUBLIC_PATH

Location of public system share.

SYS_DOWNLOAD_SHARE

Name of system share for downloads.

SYS_DOWNLOAD_PATH

Location of system share for downloads.

SYS_MULTIMEDIA_SHARE

Name of system share for multimedia content.

SYS_MULTIMEDIA_PATH

Location of system share for multimedia content.

SYS_RECORDINGS_SHARE

Name of system share for recordings.

SYS_RECORDINGS_PATH

Location of system share for recordings.

SYS_USB_SHARE

Name of system share for USB content.SYS_USB_PATHLocation of system share for USB content.SYS_WEB_SHAREName of system share for web content.SYS_WEB_PATHLocation of system share for web content.Pre-defined command definitions.CMD_AWK, CMD_CAT, CMD_CHMOD, CMD_CHOWN, CMD_CP, CMD_CUT, CMD_DATE, CMD_ECHO,CMD_EXPR, CMD_FIND, CMD_GETCFG, CMD_GREP, CMD_GZIP, CMD_HOSTNAME, CMD_LN,CMD_LOG_TOOL, CMD_MD5SUM, CMD_MKDIR, CMD_MV, CMD_PKG_TOOL, CMD_RM, CMD_RMDIR,CMD_SED, CMD_SETCFG, CMD_SLEEP, CMD_SORT, CMD_SYNC, CMD_TAR, CMD_TOUCH,CMD_WGET, CMD_WLOG, CMD_XARGS, and CMD_7Z

CMD_PKG_TOOL is assigned the path to either Optware's ipkg tool or opkg's opkg tool at runtime (if found).

results matching ""

    No results matching ""