skip nodejs upgrade if repo installation is disabled. update xo-install.cfg and readme
This commit is contained in:
16
README.md
16
README.md
@@ -145,6 +145,22 @@ deb:
|
||||
- sudo (if set in xo-install.cfg)
|
||||
```
|
||||
|
||||
Following repositories will be installed if needed and repository install is enabled in xo-install.cfg
|
||||
|
||||
```
|
||||
rpm:
|
||||
- forensics repository
|
||||
- epel repository
|
||||
- nodesource repository
|
||||
- yarn repository
|
||||
|
||||
deb:
|
||||
- universe repository (ubuntu)
|
||||
- nodesource repository
|
||||
- yarn repository
|
||||
```
|
||||
|
||||
|
||||
#### Backup proxy
|
||||
|
||||
**Proxy installation method is experimental, use at your own risk. Proxy installation from sources is not documented by Xen Orchestra team. Method used here is the outcome of trial and error.**
|
||||
|
@@ -80,7 +80,9 @@ PRESERVE="3"
|
||||
# options: true/false
|
||||
#AUTOCERT="false"
|
||||
|
||||
# If set to true, this will install the rpm/deb respoitories necessary for the Xen Orchestra intall. If set to false, these repositories will not be installed.
|
||||
# If set to true, this will install the rpm/deb repositories necessary for the Xen Orchestra install.
|
||||
# If set to false, these repositories will not be installed. Also automatic nodejs upgrade will be disabled.
|
||||
# Note that installation will fail if all needed packages aren't available from configured repositories. See README for list of packages.
|
||||
# options: true/false
|
||||
# default: true
|
||||
#INSTALL_REPOS="true"
|
||||
|
@@ -244,7 +244,7 @@ function InstallDependenciesRPM {
|
||||
# only install libvhdi-tools if vhdimount is not present
|
||||
if [[ -z $(runcmd_stdout "command -v vhdimount") ]]; then
|
||||
echo
|
||||
printprog "Installing libvhdi-tools from forensics repository"
|
||||
printprog "Installing libvhdi-tools"
|
||||
if [[ "$INSTALL_REPOS" == "true" ]]; then
|
||||
runcmd "rpm -ivh https://forensics.cert.org/cert-forensics-tools-release-el8.rpm"
|
||||
runcmd "sed -i 's/enabled=1/enabled=0/g' /etc/yum.repos.d/cert-forensics-tools.repo"
|
||||
@@ -252,7 +252,7 @@ function InstallDependenciesRPM {
|
||||
else
|
||||
runcmd "yum install -y libvhdi-tools"
|
||||
fi
|
||||
printok "Installing libvhdi-tools from forensics repository"
|
||||
printok "Installing libvhdi-tools"
|
||||
fi
|
||||
|
||||
echo
|
||||
@@ -384,14 +384,13 @@ function UpdateNodeYarn {
|
||||
local NODEV=$(runcmd_stdout "node -v 2>/dev/null| grep -Eo '[0-9.]+' | cut -d'.' -f1")
|
||||
|
||||
if [ "$PKG_FORMAT" == "rpm" ]; then
|
||||
if [[ -n "$NODEV" ]] && [[ "$NODEV" -lt "${NODEVERSION}" ]]; then
|
||||
# update node version if needed.
|
||||
# skip update if repository install is disabled as we can't quarantee this actually updates anything
|
||||
if [[ -n "$NODEV" ]] && [[ "$NODEV" -lt "${NODEVERSION}" ]] && [[ "$INSTALL_REPOS" == "true" ]]; then
|
||||
echo
|
||||
printprog "node.js version is $NODEV, upgrading to ${NODEVERSION}.x"
|
||||
|
||||
# only install nodejs repo if user allows it to be installed
|
||||
if [[ "$INSTALL_REPOS" == "true" ]]; then
|
||||
runcmd "curl -sL https://rpm.nodesource.com/setup_${NODEVERSION}.x | bash -"
|
||||
fi
|
||||
runcmd "curl -sL https://rpm.nodesource.com/setup_${NODEVERSION}.x | bash -"
|
||||
|
||||
runcmd "yum clean all"
|
||||
runcmd "yum install -y nodejs"
|
||||
@@ -410,14 +409,11 @@ function UpdateNodeYarn {
|
||||
fi
|
||||
|
||||
if [ "$PKG_FORMAT" == "deb" ]; then
|
||||
if [[ -n "$NODEV" ]] && [[ "$NODEV" -lt "${NODEVERSION}" ]]; then
|
||||
if [[ -n "$NODEV" ]] && [[ "$NODEV" -lt "${NODEVERSION}" ]] && [[ "$INSTALL_REPOS" == "true" ]]; then
|
||||
echo
|
||||
printprog "node.js version is $NODEV, upgrading to ${NODEVERSION}.x"
|
||||
|
||||
# only install nodejs repo if user allows it to be installed
|
||||
if [[ "$INSTALL_REPOS" == "true" ]]; then
|
||||
runcmd "curl -sL https://deb.nodesource.com/setup_${NODEVERSION}.x | bash -"
|
||||
fi
|
||||
runcmd "curl -sL https://deb.nodesource.com/setup_${NODEVERSION}.x | bash -"
|
||||
|
||||
runcmd "apt-get install -y nodejs"
|
||||
printok "node.js version is $NODEV, upgrading to ${NODEVERSION}.x"
|
||||
|
Reference in New Issue
Block a user