diff options
author | Arne H Juul <arnej@yahoo-inc.com> | 2017-06-13 08:53:09 +0200 |
---|---|---|
committer | Arne H Juul <arnej@yahoo-inc.com> | 2017-06-17 15:34:13 +0200 |
commit | 26dcbb4f3081a4ef544f5ff53cf1c969cab17496 (patch) | |
tree | 74465f040fb36fec69284b0c51e4c00be9436113 | |
parent | a0e1c22870d39fdf8746c446b6206307832666eb (diff) |
VESPA_HOME should not end with / anymore
* best practice for HOME-like env vars is to be just
the name of the directory without trailing slash.
64 files changed, 67 insertions, 181 deletions
diff --git a/application-preprocessor/src/main/sh/vespa-preprocess-application b/application-preprocessor/src/main/sh/vespa-preprocess-application index caca8edcc17..b238af04e3b 100644 --- a/application-preprocessor/src/main/sh/vespa-preprocess-application +++ b/application-preprocessor/src/main/sh/vespa-preprocess-application @@ -23,8 +23,6 @@ COMMON_ENV=libexec/vespa/common-env.sh source_common_env () { if [ "$VESPA_HOME" ] && [ -d "$VESPA_HOME" ]; then - # ensure it ends with "/" : - VESPA_HOME=${VESPA_HOME%/}/ export VESPA_HOME common_env=$VESPA_HOME/$COMMON_ENV if [ -f "$common_env" ]; then diff --git a/clustercontroller-standalone/src/main/sh/fleetcontroller-start b/clustercontroller-standalone/src/main/sh/fleetcontroller-start index ea1575f28a2..647480e5e17 100755 --- a/clustercontroller-standalone/src/main/sh/fleetcontroller-start +++ b/clustercontroller-standalone/src/main/sh/fleetcontroller-start @@ -23,8 +23,6 @@ COMMON_ENV=libexec/vespa/common-env.sh source_common_env () { if [ "$VESPA_HOME" ] && [ -d "$VESPA_HOME" ]; then - # ensure it ends with "/" : - VESPA_HOME=${VESPA_HOME%/}/ export VESPA_HOME common_env=$VESPA_HOME/$COMMON_ENV if [ -f "$common_env" ]; then diff --git a/config-model/src/main/perl/vespa-deploy b/config-model/src/main/perl/vespa-deploy index 844d59f7993..d0b30803611 100755 --- a/config-model/src/main/perl/vespa-deploy +++ b/config-model/src/main/perl/vespa-deploy @@ -6,7 +6,6 @@ # BEGIN perl environment bootstrap section # Do not edit between here and END as this section should stay identical in all scripts -use warnings; use File::Basename; use File::Path; @@ -57,7 +56,6 @@ sub findhome { BEGIN { my $tmp = findhome(); - if ( $tmp !~ m{[/]$} ) { $tmp .= "/"; } $ENV{'VESPA_HOME'} = $tmp; } my $VESPA_HOME = $ENV{'VESPA_HOME'}; diff --git a/config-model/src/main/sh/vespa-validate-application b/config-model/src/main/sh/vespa-validate-application index 91f2caffa7c..6bbd5bd9976 100755 --- a/config-model/src/main/sh/vespa-validate-application +++ b/config-model/src/main/sh/vespa-validate-application @@ -23,8 +23,6 @@ COMMON_ENV=libexec/vespa/common-env.sh source_common_env () { if [ "$VESPA_HOME" ] && [ -d "$VESPA_HOME" ]; then - # ensure it ends with "/" : - VESPA_HOME=${VESPA_HOME%/}/ export VESPA_HOME common_env=$VESPA_HOME/$COMMON_ENV if [ -f "$common_env" ]; then diff --git a/config-proxy/src/main/sh/vespa-config-ctl b/config-proxy/src/main/sh/vespa-config-ctl index abd9ddd74f7..4b71805e8d8 100755 --- a/config-proxy/src/main/sh/vespa-config-ctl +++ b/config-proxy/src/main/sh/vespa-config-ctl @@ -23,8 +23,6 @@ COMMON_ENV=libexec/vespa/common-env.sh source_common_env () { if [ "$VESPA_HOME" ] && [ -d "$VESPA_HOME" ]; then - # ensure it ends with "/" : - VESPA_HOME=${VESPA_HOME%/}/ export VESPA_HOME common_env=$VESPA_HOME/$COMMON_ENV if [ -f "$common_env" ]; then diff --git a/config-proxy/src/main/sh/vespa-config-loadtester b/config-proxy/src/main/sh/vespa-config-loadtester index 93ca15bd78c..fc0a33d8d49 100644 --- a/config-proxy/src/main/sh/vespa-config-loadtester +++ b/config-proxy/src/main/sh/vespa-config-loadtester @@ -23,8 +23,6 @@ COMMON_ENV=libexec/vespa/common-env.sh source_common_env () { if [ "$VESPA_HOME" ] && [ -d "$VESPA_HOME" ]; then - # ensure it ends with "/" : - VESPA_HOME=${VESPA_HOME%/}/ export VESPA_HOME common_env=$VESPA_HOME/$COMMON_ENV if [ -f "$common_env" ]; then diff --git a/config-proxy/src/main/sh/vespa-config-verification b/config-proxy/src/main/sh/vespa-config-verification index 29083cc16e8..52174495ee3 100644 --- a/config-proxy/src/main/sh/vespa-config-verification +++ b/config-proxy/src/main/sh/vespa-config-verification @@ -23,8 +23,6 @@ COMMON_ENV=libexec/vespa/common-env.sh source_common_env () { if [ "$VESPA_HOME" ] && [ -d "$VESPA_HOME" ]; then - # ensure it ends with "/" : - VESPA_HOME=${VESPA_HOME%/}/ export VESPA_HOME common_env=$VESPA_HOME/$COMMON_ENV if [ -f "$common_env" ]; then diff --git a/config/src/apps/vespa-activate-application/vespa-activate-application.sh b/config/src/apps/vespa-activate-application/vespa-activate-application.sh index 7ad59c7f060..5a1688424c8 100644 --- a/config/src/apps/vespa-activate-application/vespa-activate-application.sh +++ b/config/src/apps/vespa-activate-application/vespa-activate-application.sh @@ -23,8 +23,6 @@ COMMON_ENV=libexec/vespa/common-env.sh source_common_env () { if [ "$VESPA_HOME" ] && [ -d "$VESPA_HOME" ]; then - # ensure it ends with "/" : - VESPA_HOME=${VESPA_HOME%/}/ export VESPA_HOME common_env=$VESPA_HOME/$COMMON_ENV if [ -f "$common_env" ]; then diff --git a/config/src/apps/vespa-config/vespa-config.pl b/config/src/apps/vespa-config/vespa-config.pl index a17a106a80f..41a73ad913f 100755 --- a/config/src/apps/vespa-config/vespa-config.pl +++ b/config/src/apps/vespa-config/vespa-config.pl @@ -6,7 +6,6 @@ # BEGIN perl environment bootstrap section # Do not edit between here and END as this section should stay identical in all scripts -use warnings; use File::Basename; use File::Path; @@ -57,7 +56,6 @@ sub findhome { BEGIN { my $tmp = findhome(); - if ( $tmp !~ m{[/]$} ) { $tmp .= "/"; } $ENV{'VESPA_HOME'} = $tmp; } my $VESPA_HOME = $ENV{'VESPA_HOME'}; diff --git a/config/src/vespa/config/common/configsystem.cpp b/config/src/vespa/config/common/configsystem.cpp index b7d1f32b143..ba604d04aee 100644 --- a/config/src/vespa/config/common/configsystem.cpp +++ b/config/src/vespa/config/common/configsystem.cpp @@ -12,7 +12,7 @@ namespace { vespalib::string getConfigProxyFileName() { vespalib::string root(vespa::Defaults::vespaHome()); - return root + "var/run/configproxy.pid"; + return root + "/var/run/configproxy.pid"; } } diff --git a/configgen/bin/make-config.pl b/configgen/bin/make-config.pl index 1a1e9cded10..2919e9b004a 100755 --- a/configgen/bin/make-config.pl +++ b/configgen/bin/make-config.pl @@ -63,7 +63,6 @@ sub findhome { BEGIN { my $tmp = findhome(); - if ( $tmp !~ m{[/]$} ) { $tmp .= "/"; } $ENV{'VESPA_HOME'} = $tmp; } my $VESPA_HOME = $ENV{'VESPA_HOME'}; diff --git a/configgen/bin/make-configold.pl b/configgen/bin/make-configold.pl index cef91b937ec..8e8c92377da 100755 --- a/configgen/bin/make-configold.pl +++ b/configgen/bin/make-configold.pl @@ -63,7 +63,6 @@ sub findhome { BEGIN { my $tmp = findhome(); - if ( $tmp !~ m{[/]$} ) { $tmp .= "/"; } $ENV{'VESPA_HOME'} = $tmp; } my $VESPA_HOME = $ENV{'VESPA_HOME'}; diff --git a/configserver/src/main/sh/start-configserver b/configserver/src/main/sh/start-configserver index a18b19535bb..39d8342d7b3 100755 --- a/configserver/src/main/sh/start-configserver +++ b/configserver/src/main/sh/start-configserver @@ -23,8 +23,6 @@ COMMON_ENV=libexec/vespa/common-env.sh source_common_env () { if [ "$VESPA_HOME" ] && [ -d "$VESPA_HOME" ]; then - # ensure it ends with "/" : - VESPA_HOME=${VESPA_HOME%/}/ export VESPA_HOME common_env=$VESPA_HOME/$COMMON_ENV if [ -f "$common_env" ]; then @@ -62,17 +60,17 @@ findroot cd ${VESPA_HOME} || { echo "Cannot cd to ${VESPA_HOME}" 1>&2; exit 1; } -if [ -f ${VESPA_HOME}conf/zookeeper/zookeeper.cfg ]; then - chown ${VESPA_USER} ${VESPA_HOME}conf/zookeeper/zookeeper.cfg - chmod 644 ${VESPA_HOME}conf/zookeeper/zookeeper.cfg +if [ -f ${VESPA_HOME}/conf/zookeeper/zookeeper.cfg ]; then + chown ${VESPA_USER} ${VESPA_HOME}/conf/zookeeper/zookeeper.cfg + chmod 644 ${VESPA_HOME}/conf/zookeeper/zookeeper.cfg fi -if [ -f ${VESPA_HOME}var/zookeeper/myid ]; then - chown ${VESPA_USER} ${VESPA_HOME}var/zookeeper/myid - chmod 644 ${VESPA_HOME}var/zookeeper/myid +if [ -f ${VESPA_HOME}/var/zookeeper/myid ]; then + chown ${VESPA_USER} ${VESPA_HOME}/var/zookeeper/myid + chmod 644 ${VESPA_HOME}/var/zookeeper/myid fi -${VESPA_HOME}libexec/vespa/vespa-config.pl -isthisaconfigserver 1>/dev/null +${VESPA_HOME}/libexec/vespa/vespa-config.pl -isthisaconfigserver 1>/dev/null if [ "$?" != "0" ] ; then echo "Not able to start config server, host `hostname` is not part of 'services.addr_configserver'" exit 1; @@ -81,35 +79,35 @@ fi fixlimits checkjava -ZOOKEEPER_DATA_PATH="${VESPA_HOME}var/zookeeper/version-2" +ZOOKEEPER_DATA_PATH="${VESPA_HOME}/var/zookeeper/version-2" if [ ! -d "$ZOOKEEPER_DATA_PATH" ]; then echo "Creating data directory $ZOOKEEPER_DATA_PATH" mkdir -p $ZOOKEEPER_DATA_PATH chown yahoo:users $ZOOKEEPER_DATA_PATH fi -ZOOKEEPER_LOG_FILE="${VESPA_HOME}logs/vespa/zookeeper.configserver.log" +ZOOKEEPER_LOG_FILE="${VESPA_HOME}/logs/vespa/zookeeper.configserver.log" rm -f $ZOOKEEPER_LOG_FILE*lck # common setup -export VESPA_LOG_TARGET=file:${VESPA_HOME}logs/vespa/vespa.log -export VESPA_LOG_CONTROL_DIR="${VESPA_HOME}var/db/vespa/logcontrol" -export VESPA_LOG_CONTROL_FILE="${VESPA_HOME}var/db/vespa/logcontrol/configserver.logcontrol" +export VESPA_LOG_TARGET=file:${VESPA_HOME}/logs/vespa/vespa.log +export VESPA_LOG_CONTROL_DIR="${VESPA_HOME}/var/db/vespa/logcontrol" +export VESPA_LOG_CONTROL_FILE="${VESPA_HOME}/var/db/vespa/logcontrol/configserver.logcontrol" export VESPA_SERVICE_NAME=configserver -export LD_LIBRARY_PATH=${VESPA_HOME}lib64 +export LD_LIBRARY_PATH=${VESPA_HOME}/lib64 #Does not need fast allocation export MALLOC_ARENA_MAX=1 -vespa-run-as-vespa-user ${VESPA_HOME}libexec/vespa/start-filedistribution -vespa-run-as-vespa-user ${VESPA_HOME}libexec/vespa/start-logd +vespa-run-as-vespa-user ${VESPA_HOME}/libexec/vespa/start-filedistribution +vespa-run-as-vespa-user ${VESPA_HOME}/libexec/vespa/start-logd # stuff for the configserver process: -appdir="${VESPA_HOME}conf/configserver-app" -pidfile="${VESPA_HOME}var/run/configserver.pid" -cfpfile="${VESPA_HOME}var/jdisc_core/configserver.properties" -bundlecachedir="${VESPA_HOME}var/vespa/bundlecache/configserver" +appdir="${VESPA_HOME}/conf/configserver-app" +pidfile="${VESPA_HOME}/var/run/configserver.pid" +cfpfile="${VESPA_HOME}/var/jdisc_core/configserver.properties" +bundlecachedir="${VESPA_HOME}/var/vespa/bundlecache/configserver" export JAVAVM_LD_PRELOAD= unset LD_PRELOAD @@ -118,7 +116,7 @@ export standalone_jdisc_container__app_location=${appdir} export standalone_jdisc_container__deployment_profile=configserver # class path -CP="${VESPA_HOME}lib/jars/jdisc_core-jar-with-dependencies.jar" +CP="${VESPA_HOME}/lib/jars/jdisc_core-jar-with-dependencies.jar" baseuserargs="$vespa_base__jvmargs_configserver" serveruserargs="$cloudconfig_server__jvmargs" @@ -131,10 +129,10 @@ chown -R ${VESPA_USER} $bundlecachedir vespa-run-as-vespa-user vespa-runserver -s configserver -r 30 -p $pidfile -- \ java \ -Xms128m -Xmx2048m \ - -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=${VESPA_HOME}var/crash \ + -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=${VESPA_HOME}/var/crash \ -XX:OnOutOfMemoryError='kill -9 %p' \ $jvmargs \ - -Djava.library.path=${VESPA_HOME}lib64 \ + -Djava.library.path=${VESPA_HOME}/lib64 \ -Djava.awt.headless=true \ -Dsun.rmi.dgc.client.gcInterval=3600000 \ -Dsun.net.client.defaultConnectTimeout=5000 -Dsun.net.client.defaultReadTimeout=60000 \ @@ -143,11 +141,11 @@ vespa-run-as-vespa-user vespa-runserver -s configserver -r 30 -p $pidfile -- \ -Djdisc.export.packages= \ -Djdisc.cache.path=$bundlecachedir \ -Djdisc.debug.resources=false \ - -Djdisc.bundle.path=${VESPA_HOME}lib/jars \ + -Djdisc.bundle.path=${VESPA_HOME}/lib/jars \ -Djdisc.logger.enabled=true \ -Djdisc.logger.level=ALL \ -Djdisc.logger.tag=jdisc/configserver \ -Dfile.encoding=UTF-8 \ - -Dzookeeperlogfile=${VESPA_HOME}logs/vespa/zookeeper.configserver.log \ + -Dzookeeperlogfile=${VESPA_HOME}/logs/vespa/zookeeper.configserver.log \ -cp "$CP" \ com.yahoo.jdisc.core.StandaloneMain standalone-container-jar-with-dependencies.jar diff --git a/configserver/src/main/sh/start-filedistribution b/configserver/src/main/sh/start-filedistribution index f2df3afef17..bb8599f2bc9 100755 --- a/configserver/src/main/sh/start-filedistribution +++ b/configserver/src/main/sh/start-filedistribution @@ -23,8 +23,6 @@ COMMON_ENV=libexec/vespa/common-env.sh source_common_env () { if [ "$VESPA_HOME" ] && [ -d "$VESPA_HOME" ]; then - # ensure it ends with "/" : - VESPA_HOME=${VESPA_HOME%/}/ export VESPA_HOME common_env=$VESPA_HOME/$COMMON_ENV if [ -f "$common_env" ]; then diff --git a/configserver/src/main/sh/start-logd b/configserver/src/main/sh/start-logd index 30c8f503adc..848d8dee6aa 100644 --- a/configserver/src/main/sh/start-logd +++ b/configserver/src/main/sh/start-logd @@ -23,8 +23,6 @@ COMMON_ENV=libexec/vespa/common-env.sh source_common_env () { if [ "$VESPA_HOME" ] && [ -d "$VESPA_HOME" ]; then - # ensure it ends with "/" : - VESPA_HOME=${VESPA_HOME%/}/ export VESPA_HOME common_env=$VESPA_HOME/$COMMON_ENV if [ -f "$common_env" ]; then diff --git a/configserver/src/main/sh/stop-configserver b/configserver/src/main/sh/stop-configserver index 782ca3cb441..02f937e19ff 100755 --- a/configserver/src/main/sh/stop-configserver +++ b/configserver/src/main/sh/stop-configserver @@ -23,8 +23,6 @@ COMMON_ENV=libexec/vespa/common-env.sh source_common_env () { if [ "$VESPA_HOME" ] && [ -d "$VESPA_HOME" ]; then - # ensure it ends with "/" : - VESPA_HOME=${VESPA_HOME%/}/ export VESPA_HOME common_env=$VESPA_HOME/$COMMON_ENV if [ -f "$common_env" ]; then diff --git a/configserver/src/main/sh/vespa-configserver-remove-state b/configserver/src/main/sh/vespa-configserver-remove-state index a1dcda842d2..404f0f89a53 100755 --- a/configserver/src/main/sh/vespa-configserver-remove-state +++ b/configserver/src/main/sh/vespa-configserver-remove-state @@ -23,8 +23,6 @@ COMMON_ENV=libexec/vespa/common-env.sh source_common_env () { if [ "$VESPA_HOME" ] && [ -d "$VESPA_HOME" ]; then - # ensure it ends with "/" : - VESPA_HOME=${VESPA_HOME%/}/ export VESPA_HOME common_env=$VESPA_HOME/$COMMON_ENV if [ -f "$common_env" ]; then diff --git a/container-disc/src/main/sh/vespa-start-container-daemon.sh b/container-disc/src/main/sh/vespa-start-container-daemon.sh index 65b89d3f378..505c904ddb3 100755 --- a/container-disc/src/main/sh/vespa-start-container-daemon.sh +++ b/container-disc/src/main/sh/vespa-start-container-daemon.sh @@ -20,21 +20,21 @@ cd ${VESPA_HOME} || { echo "Cannot cd to ${VESPA_HOME}" 1>&2; exit 1; } . libexec/vespa/common-env.sh DISCRIMINATOR=`echo ${VESPA_CONFIG_ID} | md5sum | cut -d' ' -f1` -CONTAINER_HOME="${VESPA_HOME}var/jdisc_container/${DISCRIMINATOR}/" +CONTAINER_HOME="${VESPA_HOME}/var/jdisc_container/${DISCRIMINATOR}/" -ZOOKEEPER_LOG_FILE="${VESPA_HOME}logs/vespa/zookeeper.${VESPA_SERVICE_NAME}.log" +ZOOKEEPER_LOG_FILE="${VESPA_HOME}/logs/vespa/zookeeper.${VESPA_SERVICE_NAME}.log" rm -f $ZOOKEEPER_LOG_FILE*lck # common setup -export VESPA_LOG_TARGET=file:${VESPA_HOME}logs/vespa/vespa.log -export VESPA_LOG_CONTROL_DIR=${VESPA_HOME}var/db/vespa/logcontrol -export LD_LIBRARY_PATH=${VESPA_HOME}lib64 +export VESPA_LOG_TARGET=file:${VESPA_HOME}/logs/vespa/vespa.log +export VESPA_LOG_CONTROL_DIR=${VESPA_HOME}/var/db/vespa/logcontrol +export LD_LIBRARY_PATH=${VESPA_HOME}/lib64 cfpfile=${CONTAINER_HOME}/jdisc.properties bundlecachedir=${CONTAINER_HOME}/bundlecache # class path -CP="${VESPA_HOME}lib/jars/jdisc_core-jar-with-dependencies.jar" +CP="${VESPA_HOME}/lib/jars/jdisc_core-jar-with-dependencies.jar" mkdir -p $bundlecachedir || exit 1 printenv > $cfpfile || exit 1 @@ -176,7 +176,7 @@ exec_jsvc () { CP="${jsvc_classpath_pre}:${CP}" fi for jf in $jsvc_extra_classpath_libjars ; do - CP="${CP}:${VESPA_HOME}lib/jars/$jf.jar" + CP="${CP}:${VESPA_HOME}/lib/jars/$jf.jar" done for jf in $jsvc_extra_classpath_files ; do CP="${CP}:jf" @@ -191,9 +191,9 @@ exec_jsvc () { ${jvm_gcopts} \ -XX:MaxJavaStackTraceDepth=-1 \ -XX:+HeapDumpOnOutOfMemoryError \ - -XX:HeapDumpPath="${VESPA_HOME}var/crash" \ + -XX:HeapDumpPath="${VESPA_HOME}/var/crash" \ -XX:OnOutOfMemoryError='kill -9 %p' \ - -Djava.library.path="${VESPA_HOME}lib64" \ + -Djava.library.path="${VESPA_HOME}/lib64" \ -Djava.awt.headless=true \ -Djavax.net.ssl.keyStoreType=JKS \ -Dsun.rmi.dgc.client.gcInterval=3600000 \ @@ -202,7 +202,7 @@ exec_jsvc () { -Djdisc.export.packages=${jdisc_export_packages} \ -Djdisc.cache.path="$bundlecachedir" \ -Djdisc.debug.resources=false \ - -Djdisc.bundle.path="${VESPA_HOME}lib/jars" \ + -Djdisc.bundle.path="${VESPA_HOME}/lib/jars" \ -Djdisc.logger.enabled=true \ -Djdisc.logger.level=ALL \ -Djdisc.logger.tag="${VESPA_CONFIG_ID}" \ @@ -212,7 +212,7 @@ exec_jsvc () { -Dfile.encoding=UTF-8 \ -cp "$CP" \ "$@" \ - com.yahoo.jdisc.core.BootstrapDaemon file:${VESPA_HOME}lib/jars/container-disc-jar-with-dependencies.jar + com.yahoo.jdisc.core.BootstrapDaemon file:${VESPA_HOME}/lib/jars/container-disc-jar-with-dependencies.jar } maybe_use_jsvc () { @@ -233,7 +233,7 @@ maybe_use_jsvc () { import_cfg_var jsvc_normal_opts import_cfg_var jsvc_java_home_opt if [ "$jsvc_use_pidfile" = "true" ]; then - import_cfg_var jsvc_pidfile_opt "-pidfile ${VESPA_HOME}var/run/jsvc.${VESPA_SERVICE_NAME}.pid" + import_cfg_var jsvc_pidfile_opt "-pidfile ${VESPA_HOME}/var/run/jsvc.${VESPA_SERVICE_NAME}.pid" else import_cfg_var jsvc_pidfile_opt "" fi @@ -262,9 +262,9 @@ exec $numactlcmd $envcmd java \ ${jvm_gcopts} \ -XX:MaxJavaStackTraceDepth=-1 \ -XX:+HeapDumpOnOutOfMemoryError \ - -XX:HeapDumpPath="${VESPA_HOME}var/crash" \ + -XX:HeapDumpPath="${VESPA_HOME}/var/crash" \ -XX:OnOutOfMemoryError='kill -9 %p' \ - -Djava.library.path="${VESPA_HOME}lib64" \ + -Djava.library.path="${VESPA_HOME}/lib64" \ -Djava.awt.headless=true \ -Djavax.net.ssl.keyStoreType=JKS \ -Dsun.rmi.dgc.client.gcInterval=3600000 \ @@ -273,7 +273,7 @@ exec $numactlcmd $envcmd java \ -Djdisc.export.packages=${jdisc_export_packages} \ -Djdisc.cache.path="$bundlecachedir" \ -Djdisc.debug.resources=false \ - -Djdisc.bundle.path="${VESPA_HOME}lib/jars" \ + -Djdisc.bundle.path="${VESPA_HOME}/lib/jars" \ -Djdisc.logger.enabled=false \ -Djdisc.logger.level=ALL \ -Djdisc.logger.tag="${VESPA_CONFIG_ID}" \ @@ -283,4 +283,4 @@ exec $numactlcmd $envcmd java \ -Dfile.encoding=UTF-8 \ -cp "$CP" \ "$@" \ - com.yahoo.jdisc.core.StandaloneMain file:${VESPA_HOME}lib/jars/container-disc-jar-with-dependencies.jar + com.yahoo.jdisc.core.StandaloneMain file:${VESPA_HOME}/lib/jars/container-disc-jar-with-dependencies.jar diff --git a/container-search/src/main/sh/invoke b/container-search/src/main/sh/invoke index 5da11fa3974..f53b6cc4538 100755 --- a/container-search/src/main/sh/invoke +++ b/container-search/src/main/sh/invoke @@ -23,8 +23,6 @@ COMMON_ENV=libexec/vespa/common-env.sh source_common_env () { if [ "$VESPA_HOME" ] && [ -d "$VESPA_HOME" ]; then - # ensure it ends with "/" : - VESPA_HOME=${VESPA_HOME%/}/ export VESPA_HOME common_env=$VESPA_HOME/$COMMON_ENV if [ -f "$common_env" ]; then diff --git a/defaults/src/main/java/com/yahoo/vespa/defaults/Defaults.java b/defaults/src/main/java/com/yahoo/vespa/defaults/Defaults.java index 0fe6f8abe4f..928b8920e3c 100644 --- a/defaults/src/main/java/com/yahoo/vespa/defaults/Defaults.java +++ b/defaults/src/main/java/com/yahoo/vespa/defaults/Defaults.java @@ -31,12 +31,14 @@ public class Defaults { static private String findVespaHome() { Optional<String> vespaHomeEnv = Optional.ofNullable(System.getenv("VESPA_HOME")); if ( ! vespaHomeEnv.isPresent() || vespaHomeEnv.get().trim().isEmpty()) { - log.info("VESPA_HOME not set, using /opt/vespa/"); - return "/opt/vespa/"; + log.info("VESPA_HOME not set, using /opt/vespa"); + return "/opt/vespa"; } String vespaHome = vespaHomeEnv.get().trim(); - if ( ! vespaHome.endsWith("/")) - vespaHome = vespaHome + "/"; + if (vespaHome.endsWith("/")) { + int sz = vespaHome.length() - 1; + vespaHome = vespaHome.substring(0, sz); + } return vespaHome; } @@ -71,9 +73,9 @@ public class Defaults { public String vespaUser() { return vespaUser; } /** - * Returns the path to the root under which Vespa should read and write files, ending by "/". - * - * @return the vespa home directory, ending by "/" + * Returns the path to the root under which Vespa should read and write files. + * Will not end with a "/". + * @return the vespa home directory */ public String vespaHome() { return vespaHome; } @@ -90,7 +92,7 @@ public class Defaults { public String underVespaHome(String path) { if (path.startsWith("/")) return path; if (path.startsWith("./")) return path; - return vespaHome() + path; + return vespaHome() + "/" + path; } /** diff --git a/defaults/src/vespa/defaults.cpp b/defaults/src/vespa/defaults.cpp index 073d5978717..a7d290bde93 100644 --- a/defaults/src/vespa/defaults.cpp +++ b/defaults/src/vespa/defaults.cpp @@ -13,8 +13,7 @@ namespace { -const char *defaultHome = "/opt/vespa/"; -char computedHome[PATH_MAX]; +const char *defaultHome = "/opt/vespa"; const char *defaultUser = "yahoo"; int defaultWebServicePort = 8080; int defaultPortBase = 19000; @@ -45,20 +44,11 @@ void findDefaults() { const char *env = getenv("VESPA_HOME"); if (env != NULL && *env != '\0') { DIR *dp = NULL; - if (*env == '/') { + if (*env == '/' || *env == '.') { dp = opendir(env); } if (dp != NULL) { - size_t len = strlen(env); - if (env[len-1] == '/') { - // already ends with slash - defaultHome = env; - } else { - // append slash - strncpy(computedHome, env, PATH_MAX); - strncat(computedHome, "/", PATH_MAX); - defaultHome = computedHome; - } + defaultHome = env; // fprintf(stderr, "debug\tVESPA_HOME is '%s'\n", defaultHome); closedir(dp); } else { diff --git a/filedistribution/src/apps/status/vespa-status-filedistribution.sh b/filedistribution/src/apps/status/vespa-status-filedistribution.sh index 88735f70a20..b5f9bc291d5 100644 --- a/filedistribution/src/apps/status/vespa-status-filedistribution.sh +++ b/filedistribution/src/apps/status/vespa-status-filedistribution.sh @@ -23,8 +23,6 @@ COMMON_ENV=libexec/vespa/common-env.sh source_common_env () { if [ "$VESPA_HOME" ] && [ -d "$VESPA_HOME" ]; then - # ensure it ends with "/" : - VESPA_HOME=${VESPA_HOME%/}/ export VESPA_HOME common_env=$VESPA_HOME/$COMMON_ENV if [ -f "$common_env" ]; then diff --git a/jdisc_core/src/main/perl/vespa-jdisc-logfmt b/jdisc_core/src/main/perl/vespa-jdisc-logfmt index 50f01bd3f67..c3fecad52a9 100755 --- a/jdisc_core/src/main/perl/vespa-jdisc-logfmt +++ b/jdisc_core/src/main/perl/vespa-jdisc-logfmt @@ -54,7 +54,6 @@ sub findhome { BEGIN { my $tmp = findhome(); - if ( $tmp !~ m{[/]$} ) { $tmp .= "/"; } $ENV{'VESPA_HOME'} = $tmp; } my $VESPA_HOME = $ENV{'VESPA_HOME'}; diff --git a/libmlr/bin/xml2cpp b/libmlr/bin/xml2cpp index 304c55f4f8e..05ae9b9d933 100755 --- a/libmlr/bin/xml2cpp +++ b/libmlr/bin/xml2cpp @@ -23,8 +23,6 @@ COMMON_ENV=libexec/vespa/common-env.sh source_common_env () { if [ "$VESPA_HOME" ] && [ -d "$VESPA_HOME" ]; then - # ensure it ends with "/" : - VESPA_HOME=${VESPA_HOME%/}/ export VESPA_HOME common_env=$VESPA_HOME/$COMMON_ENV if [ -f "$common_env" ]; then diff --git a/logserver/bin/logserver-start.sh b/logserver/bin/logserver-start.sh index 5dd0dfafa3f..bc3270499fd 100755 --- a/logserver/bin/logserver-start.sh +++ b/logserver/bin/logserver-start.sh @@ -23,8 +23,6 @@ COMMON_ENV=libexec/vespa/common-env.sh source_common_env () { if [ "$VESPA_HOME" ] && [ -d "$VESPA_HOME" ]; then - # ensure it ends with "/" : - VESPA_HOME=${VESPA_HOME%/}/ export VESPA_HOME common_env=$VESPA_HOME/$COMMON_ENV if [ -f "$common_env" ]; then diff --git a/memfilepersistence/src/vespa/memfilepersistence/tools/vdsdiskapp.cpp b/memfilepersistence/src/vespa/memfilepersistence/tools/vdsdiskapp.cpp index f7cab110172..9c962ceda50 100644 --- a/memfilepersistence/src/vespa/memfilepersistence/tools/vdsdiskapp.cpp +++ b/memfilepersistence/src/vespa/memfilepersistence/tools/vdsdiskapp.cpp @@ -10,7 +10,7 @@ namespace { int Main() override { try { std::string dir = vespa::Defaults::vespaHome(); - dir.append("var/db/vespa/vds"); + dir.append("/var/db/vespa/vds"); return storage::memfile::VdsDiskTool::run( _argc, _argv, dir.c_str(), std::cout, std::cerr); diff --git a/node-admin/configserver-app/start-config-server.sh b/node-admin/configserver-app/start-config-server.sh index 2d6c7df5123..448621431f0 100755 --- a/node-admin/configserver-app/start-config-server.sh +++ b/node-admin/configserver-app/start-config-server.sh @@ -23,8 +23,6 @@ COMMON_ENV=libexec/vespa/common-env.sh source_common_env () { if [ "$VESPA_HOME" ] && [ -d "$VESPA_HOME" ]; then - # ensure it ends with "/" : - VESPA_HOME=${VESPA_HOME%/}/ export VESPA_HOME common_env=$VESPA_HOME/$COMMON_ENV if [ -f "$common_env" ]; then diff --git a/node-admin/include/nodectl-instance.sh b/node-admin/include/nodectl-instance.sh index d38cb876b42..cf45244ca31 100644 --- a/node-admin/include/nodectl-instance.sh +++ b/node-admin/include/nodectl-instance.sh @@ -45,8 +45,6 @@ COMMON_ENV=libexec/vespa/common-env.sh source_common_env () { if [ "$VESPA_HOME" ] && [ -d "$VESPA_HOME" ]; then - # ensure it ends with "/" : - VESPA_HOME=${VESPA_HOME%/}/ export VESPA_HOME common_env=$VESPA_HOME/$COMMON_ENV if [ -f "$common_env" ]; then diff --git a/searchcore/src/apps/vespa-remove-indexes/vespa-remove-index.sh b/searchcore/src/apps/vespa-remove-indexes/vespa-remove-index.sh index bd6118b0155..7200a7c95af 100755 --- a/searchcore/src/apps/vespa-remove-indexes/vespa-remove-index.sh +++ b/searchcore/src/apps/vespa-remove-indexes/vespa-remove-index.sh @@ -23,8 +23,6 @@ COMMON_ENV=libexec/vespa/common-env.sh source_common_env () { if [ "$VESPA_HOME" ] && [ -d "$VESPA_HOME" ]; then - # ensure it ends with "/" : - VESPA_HOME=${VESPA_HOME%/}/ export VESPA_HOME common_env=$VESPA_HOME/$COMMON_ENV if [ -f "$common_env" ]; then diff --git a/searchlib/src/main/sh/ga b/searchlib/src/main/sh/ga index 45abb6375f3..009b9684160 100644 --- a/searchlib/src/main/sh/ga +++ b/searchlib/src/main/sh/ga @@ -23,8 +23,6 @@ COMMON_ENV=libexec/vespa/common-env.sh source_common_env () { if [ "$VESPA_HOME" ] && [ -d "$VESPA_HOME" ]; then - # ensure it ends with "/" : - VESPA_HOME=${VESPA_HOME%/}/ export VESPA_HOME common_env=$VESPA_HOME/$COMMON_ENV if [ -f "$common_env" ]; then diff --git a/searchlib/src/main/sh/vespa-gbdt-converter b/searchlib/src/main/sh/vespa-gbdt-converter index 2571e470690..7f754635ac8 100755 --- a/searchlib/src/main/sh/vespa-gbdt-converter +++ b/searchlib/src/main/sh/vespa-gbdt-converter @@ -23,8 +23,6 @@ COMMON_ENV=libexec/vespa/common-env.sh source_common_env () { if [ "$VESPA_HOME" ] && [ -d "$VESPA_HOME" ]; then - # ensure it ends with "/" : - VESPA_HOME=${VESPA_HOME%/}/ export VESPA_HOME common_env=$VESPA_HOME/$COMMON_ENV if [ -f "$common_env" ]; then diff --git a/searchlib/src/main/sh/vespa-treenet-converter b/searchlib/src/main/sh/vespa-treenet-converter index 7619a794b7a..f8a3201e1f7 100755 --- a/searchlib/src/main/sh/vespa-treenet-converter +++ b/searchlib/src/main/sh/vespa-treenet-converter @@ -23,8 +23,6 @@ COMMON_ENV=libexec/vespa/common-env.sh source_common_env () { if [ "$VESPA_HOME" ] && [ -d "$VESPA_HOME" ]; then - # ensure it ends with "/" : - VESPA_HOME=${VESPA_HOME%/}/ export VESPA_HOME common_env=$VESPA_HOME/$COMMON_ENV if [ -f "$common_env" ]; then diff --git a/standalone-container/src/main/sh/jdisc_container_start b/standalone-container/src/main/sh/jdisc_container_start index fb57ae7aa49..5fb4642a21d 100755 --- a/standalone-container/src/main/sh/jdisc_container_start +++ b/standalone-container/src/main/sh/jdisc_container_start @@ -23,8 +23,6 @@ COMMON_ENV=libexec/vespa/common-env.sh source_common_env () { if [ "$VESPA_HOME" ] && [ -d "$VESPA_HOME" ]; then - # ensure it ends with "/" : - VESPA_HOME=${VESPA_HOME%/}/ export VESPA_HOME common_env=$VESPA_HOME/$COMMON_ENV if [ -f "$common_env" ]; then diff --git a/storage/src/vespa/storage/storageserver/statemanager.cpp b/storage/src/vespa/storage/storageserver/statemanager.cpp index 4e648aae3f5..3ba5ba61fcd 100644 --- a/storage/src/vespa/storage/storageserver/statemanager.cpp +++ b/storage/src/vespa/storage/storageserver/statemanager.cpp @@ -506,7 +506,7 @@ namespace { uint32_t fileIndex = fileCounter % 8; std::ostringstream fileName; fileName << vespa::Defaults::vespaHome() - << "tmp/hostinfo." << pid << "." << fileIndex + << "/tmp/hostinfo." << pid << "." << fileIndex << ".report"; return fileName.str(); } diff --git a/storage/src/vespa/storage/visiting/visitorlibraries.cpp b/storage/src/vespa/storage/visiting/visitorlibraries.cpp index 08fb40ca423..2f13c16e42d 100644 --- a/storage/src/vespa/storage/visiting/visitorlibraries.cpp +++ b/storage/src/vespa/storage/visiting/visitorlibraries.cpp @@ -30,7 +30,7 @@ VisitorLibraries::getLibrary(StorageServerInterface& storageServer, const std::s if (!lib->Open(file.c_str())) { std::string error = lib->GetLastErrorString(); std::string absfile = vespa::Defaults::vespaHome(); - absfile.append("libexec/vespa/storage/lib" + libName + ".so"); + absfile.append("/libexec/vespa/storage/lib" + libName + ".so"); if (!lib->Open(absfile.c_str())) { LOG(error, "Could not load library %s: %s", file.c_str(), error.c_str()); diff --git a/vespa_feed_perf/src/main/sh/vespa-feed-perf b/vespa_feed_perf/src/main/sh/vespa-feed-perf index d99cd23d324..d1dcead7be6 100755 --- a/vespa_feed_perf/src/main/sh/vespa-feed-perf +++ b/vespa_feed_perf/src/main/sh/vespa-feed-perf @@ -23,8 +23,6 @@ COMMON_ENV=libexec/vespa/common-env.sh source_common_env () { if [ "$VESPA_HOME" ] && [ -d "$VESPA_HOME" ]; then - # ensure it ends with "/" : - VESPA_HOME=${VESPA_HOME%/}/ export VESPA_HOME common_env=$VESPA_HOME/$COMMON_ENV if [ -f "$common_env" ]; then diff --git a/vespabase/src/common-env.sh b/vespabase/src/common-env.sh index 50ee3d70feb..39107ae5500 100755 --- a/vespabase/src/common-env.sh +++ b/vespabase/src/common-env.sh @@ -124,7 +124,7 @@ consider_fallback VESPA_VALGRIND_OPT "--num-callers=32 \ --freelist-vol=1000000000 \ --leak-check=full \ --show-reachable=yes \ ---suppressions=${VESPA_HOME}etc/vespa/suppressions.txt" +--suppressions=${VESPA_HOME}/etc/vespa/suppressions.txt" consider_fallback VESPA_USE_HUGEPAGES_LIST $(get_var "hugepages_list") consider_fallback VESPA_USE_HUGEPAGES_LIST "all" diff --git a/vespabase/src/rhel-prestart.sh b/vespabase/src/rhel-prestart.sh index 2a1a119200b..9c20ddd78f5 100755 --- a/vespabase/src/rhel-prestart.sh +++ b/vespabase/src/rhel-prestart.sh @@ -23,8 +23,6 @@ COMMON_ENV=libexec/vespa/common-env.sh source_common_env () { if [ "$VESPA_HOME" ] && [ -d "$VESPA_HOME" ]; then - # ensure it ends with "/" : - VESPA_HOME=${VESPA_HOME%/}/ export VESPA_HOME common_env=$VESPA_HOME/$COMMON_ENV if [ -f "$common_env" ]; then diff --git a/vespabase/src/start-cbinaries.sh b/vespabase/src/start-cbinaries.sh index e9a34298be1..40e859f7b9e 100755 --- a/vespabase/src/start-cbinaries.sh +++ b/vespabase/src/start-cbinaries.sh @@ -23,8 +23,6 @@ COMMON_ENV=libexec/vespa/common-env.sh source_common_env () { if [ "$VESPA_HOME" ] && [ -d "$VESPA_HOME" ]; then - # ensure it ends with "/" : - VESPA_HOME=${VESPA_HOME%/}/ export VESPA_HOME common_env=$VESPA_HOME/$COMMON_ENV if [ -f "$common_env" ]; then @@ -135,7 +133,7 @@ configure_vespa_malloc () { if $no_valgrind || $use_callgrind; then # should really check that format is same as binary below for pre in lib64 lib; do - tryfile="${VESPA_HOME}${pre}/${suf}" + tryfile="${VESPA_HOME}/${pre}/${suf}" if [ -f "$tryfile" ]; then LD_PRELOAD="$tryfile" log_debug_message "Using LD_PRELOAD='$tryfile'" diff --git a/vespabase/src/start-tool.sh b/vespabase/src/start-tool.sh index 2efaa4e24a7..4a2ddbb61cf 100755 --- a/vespabase/src/start-tool.sh +++ b/vespabase/src/start-tool.sh @@ -23,8 +23,6 @@ COMMON_ENV=libexec/vespa/common-env.sh source_common_env () { if [ "$VESPA_HOME" ] && [ -d "$VESPA_HOME" ]; then - # ensure it ends with "/" : - VESPA_HOME=${VESPA_HOME%/}/ export VESPA_HOME common_env=$VESPA_HOME/$COMMON_ENV if [ -f "$common_env" ]; then diff --git a/vespabase/src/start-vespa-base.sh b/vespabase/src/start-vespa-base.sh index 4cb5d3644f6..cb97c245dea 100755 --- a/vespabase/src/start-vespa-base.sh +++ b/vespabase/src/start-vespa-base.sh @@ -23,8 +23,6 @@ COMMON_ENV=libexec/vespa/common-env.sh source_common_env () { if [ "$VESPA_HOME" ] && [ -d "$VESPA_HOME" ]; then - # ensure it ends with "/" : - VESPA_HOME=${VESPA_HOME%/}/ export VESPA_HOME common_env=$VESPA_HOME/$COMMON_ENV if [ -f "$common_env" ]; then diff --git a/vespabase/src/stop-vespa-base.sh b/vespabase/src/stop-vespa-base.sh index eb5d992612f..dde1cb880b0 100755 --- a/vespabase/src/stop-vespa-base.sh +++ b/vespabase/src/stop-vespa-base.sh @@ -23,8 +23,6 @@ COMMON_ENV=libexec/vespa/common-env.sh source_common_env () { if [ "$VESPA_HOME" ] && [ -d "$VESPA_HOME" ]; then - # ensure it ends with "/" : - VESPA_HOME=${VESPA_HOME%/}/ export VESPA_HOME common_env=$VESPA_HOME/$COMMON_ENV if [ -f "$common_env" ]; then diff --git a/vespabase/src/vespa-start-configserver.sh b/vespabase/src/vespa-start-configserver.sh index 2882efce2fa..cba6cbfd740 100755 --- a/vespabase/src/vespa-start-configserver.sh +++ b/vespabase/src/vespa-start-configserver.sh @@ -23,8 +23,6 @@ COMMON_ENV=libexec/vespa/common-env.sh source_common_env () { if [ "$VESPA_HOME" ] && [ -d "$VESPA_HOME" ]; then - # ensure it ends with "/" : - VESPA_HOME=${VESPA_HOME%/}/ export VESPA_HOME common_env=$VESPA_HOME/$COMMON_ENV if [ -f "$common_env" ]; then @@ -60,8 +58,8 @@ findroot # END environment bootstrap section -${VESPA_HOME}bin/vespa-prestart.sh || exit 1 -willrun=${VESPA_HOME}libexec/vespa/start-configserver +${VESPA_HOME}/bin/vespa-prestart.sh || exit 1 +willrun=${VESPA_HOME}/libexec/vespa/start-configserver if [ -x $willrun ]; then echo "Starting $willrun as a background process." >&2 exec </dev/null diff --git a/vespabase/src/vespa-start-services.sh b/vespabase/src/vespa-start-services.sh index 73fd18a54ab..e3cdf855850 100755 --- a/vespabase/src/vespa-start-services.sh +++ b/vespabase/src/vespa-start-services.sh @@ -23,8 +23,6 @@ COMMON_ENV=libexec/vespa/common-env.sh source_common_env () { if [ "$VESPA_HOME" ] && [ -d "$VESPA_HOME" ]; then - # ensure it ends with "/" : - VESPA_HOME=${VESPA_HOME%/}/ export VESPA_HOME common_env=$VESPA_HOME/$COMMON_ENV if [ -f "$common_env" ]; then @@ -60,8 +58,8 @@ findroot # END environment bootstrap section -${VESPA_HOME}bin/vespa-prestart.sh || exit 1 -willrun=${VESPA_HOME}libexec/vespa/start-vespa-base.sh +${VESPA_HOME}/bin/vespa-prestart.sh || exit 1 +willrun=${VESPA_HOME}/libexec/vespa/start-vespa-base.sh if [ -x $willrun ]; then echo "Starting $willrun as a background process." >&2 exec </dev/null diff --git a/vespabase/src/vespa-stop-configserver.sh b/vespabase/src/vespa-stop-configserver.sh index 45f9c4a33ed..33532744ae3 100755 --- a/vespabase/src/vespa-stop-configserver.sh +++ b/vespabase/src/vespa-stop-configserver.sh @@ -23,8 +23,6 @@ COMMON_ENV=libexec/vespa/common-env.sh source_common_env () { if [ "$VESPA_HOME" ] && [ -d "$VESPA_HOME" ]; then - # ensure it ends with "/" : - VESPA_HOME=${VESPA_HOME%/}/ export VESPA_HOME common_env=$VESPA_HOME/$COMMON_ENV if [ -f "$common_env" ]; then @@ -60,7 +58,7 @@ findroot # END environment bootstrap section -willrun=${VESPA_HOME}libexec/vespa/stop-configserver +willrun=${VESPA_HOME}/libexec/vespa/stop-configserver if [ -x $willrun ]; then echo "Executing $willrun" >&2 exec $willrun diff --git a/vespabase/src/vespa-stop-services.sh b/vespabase/src/vespa-stop-services.sh index e4ea4a6a5e4..8d519a5fa9e 100755 --- a/vespabase/src/vespa-stop-services.sh +++ b/vespabase/src/vespa-stop-services.sh @@ -23,8 +23,6 @@ COMMON_ENV=libexec/vespa/common-env.sh source_common_env () { if [ "$VESPA_HOME" ] && [ -d "$VESPA_HOME" ]; then - # ensure it ends with "/" : - VESPA_HOME=${VESPA_HOME%/}/ export VESPA_HOME common_env=$VESPA_HOME/$COMMON_ENV if [ -f "$common_env" ]; then @@ -60,7 +58,7 @@ findroot # END environment bootstrap section -willrun=${VESPA_HOME}libexec/vespa/stop-vespa-base.sh +willrun=${VESPA_HOME}/libexec/vespa/stop-vespa-base.sh if [ -x $willrun ]; then echo "Executing $willrun" >&2 exec $willrun diff --git a/vespaclient-java/src/main/sh/vespa-destination.sh b/vespaclient-java/src/main/sh/vespa-destination.sh index 6ad8d005dee..829427b50ad 100755 --- a/vespaclient-java/src/main/sh/vespa-destination.sh +++ b/vespaclient-java/src/main/sh/vespa-destination.sh @@ -23,8 +23,6 @@ COMMON_ENV=libexec/vespa/common-env.sh source_common_env () { if [ "$VESPA_HOME" ] && [ -d "$VESPA_HOME" ]; then - # ensure it ends with "/" : - VESPA_HOME=${VESPA_HOME%/}/ export VESPA_HOME common_env=$VESPA_HOME/$COMMON_ENV if [ -f "$common_env" ]; then diff --git a/vespaclient-java/src/main/sh/vespa-document-statistics.sh b/vespaclient-java/src/main/sh/vespa-document-statistics.sh index 29dfdad2031..9bac0c0047b 100755 --- a/vespaclient-java/src/main/sh/vespa-document-statistics.sh +++ b/vespaclient-java/src/main/sh/vespa-document-statistics.sh @@ -23,8 +23,6 @@ COMMON_ENV=libexec/vespa/common-env.sh source_common_env () { if [ "$VESPA_HOME" ] && [ -d "$VESPA_HOME" ]; then - # ensure it ends with "/" : - VESPA_HOME=${VESPA_HOME%/}/ export VESPA_HOME common_env=$VESPA_HOME/$COMMON_ENV if [ -f "$common_env" ]; then diff --git a/vespaclient-java/src/main/sh/vespa-feeder.sh b/vespaclient-java/src/main/sh/vespa-feeder.sh index 459297acad1..e322fb897c2 100755 --- a/vespaclient-java/src/main/sh/vespa-feeder.sh +++ b/vespaclient-java/src/main/sh/vespa-feeder.sh @@ -23,8 +23,6 @@ COMMON_ENV=libexec/vespa/common-env.sh source_common_env () { if [ "$VESPA_HOME" ] && [ -d "$VESPA_HOME" ]; then - # ensure it ends with "/" : - VESPA_HOME=${VESPA_HOME%/}/ export VESPA_HOME common_env=$VESPA_HOME/$COMMON_ENV if [ -f "$common_env" ]; then diff --git a/vespaclient-java/src/main/sh/vespa-get.sh b/vespaclient-java/src/main/sh/vespa-get.sh index f003c94e227..552379617e2 100644 --- a/vespaclient-java/src/main/sh/vespa-get.sh +++ b/vespaclient-java/src/main/sh/vespa-get.sh @@ -23,8 +23,6 @@ COMMON_ENV=libexec/vespa/common-env.sh source_common_env () { if [ "$VESPA_HOME" ] && [ -d "$VESPA_HOME" ]; then - # ensure it ends with "/" : - VESPA_HOME=${VESPA_HOME%/}/ export VESPA_HOME common_env=$VESPA_HOME/$COMMON_ENV if [ -f "$common_env" ]; then diff --git a/vespaclient-java/src/main/sh/vespa-query-profile-dump-tool.sh b/vespaclient-java/src/main/sh/vespa-query-profile-dump-tool.sh index a9dee86342b..79d432bc883 100755 --- a/vespaclient-java/src/main/sh/vespa-query-profile-dump-tool.sh +++ b/vespaclient-java/src/main/sh/vespa-query-profile-dump-tool.sh @@ -23,8 +23,6 @@ COMMON_ENV=libexec/vespa/common-env.sh source_common_env () { if [ "$VESPA_HOME" ] && [ -d "$VESPA_HOME" ]; then - # ensure it ends with "/" : - VESPA_HOME=${VESPA_HOME%/}/ export VESPA_HOME common_env=$VESPA_HOME/$COMMON_ENV if [ -f "$common_env" ]; then diff --git a/vespaclient-java/src/main/sh/vespa-stat.sh b/vespaclient-java/src/main/sh/vespa-stat.sh index c180fbf25ed..3c1eab6c6e3 100644 --- a/vespaclient-java/src/main/sh/vespa-stat.sh +++ b/vespaclient-java/src/main/sh/vespa-stat.sh @@ -23,8 +23,6 @@ COMMON_ENV=libexec/vespa/common-env.sh source_common_env () { if [ "$VESPA_HOME" ] && [ -d "$VESPA_HOME" ]; then - # ensure it ends with "/" : - VESPA_HOME=${VESPA_HOME%/}/ export VESPA_HOME common_env=$VESPA_HOME/$COMMON_ENV if [ -f "$common_env" ]; then diff --git a/vespaclient-java/src/main/sh/vespa-summary-benchmark.sh b/vespaclient-java/src/main/sh/vespa-summary-benchmark.sh index 77db9cd8a42..83f019b8db1 100755 --- a/vespaclient-java/src/main/sh/vespa-summary-benchmark.sh +++ b/vespaclient-java/src/main/sh/vespa-summary-benchmark.sh @@ -23,8 +23,6 @@ COMMON_ENV=libexec/vespa/common-env.sh source_common_env () { if [ "$VESPA_HOME" ] && [ -d "$VESPA_HOME" ]; then - # ensure it ends with "/" : - VESPA_HOME=${VESPA_HOME%/}/ export VESPA_HOME common_env=$VESPA_HOME/$COMMON_ENV if [ -f "$common_env" ]; then diff --git a/vespaclient-java/src/main/sh/vespa-visit-target.sh b/vespaclient-java/src/main/sh/vespa-visit-target.sh index cc72e4caf72..fb5aa908232 100755 --- a/vespaclient-java/src/main/sh/vespa-visit-target.sh +++ b/vespaclient-java/src/main/sh/vespa-visit-target.sh @@ -23,8 +23,6 @@ COMMON_ENV=libexec/vespa/common-env.sh source_common_env () { if [ "$VESPA_HOME" ] && [ -d "$VESPA_HOME" ]; then - # ensure it ends with "/" : - VESPA_HOME=${VESPA_HOME%/}/ export VESPA_HOME common_env=$VESPA_HOME/$COMMON_ENV if [ -f "$common_env" ]; then diff --git a/vespaclient-java/src/main/sh/vespa-visit.sh b/vespaclient-java/src/main/sh/vespa-visit.sh index 201a3807a6a..e029cb0b429 100755 --- a/vespaclient-java/src/main/sh/vespa-visit.sh +++ b/vespaclient-java/src/main/sh/vespa-visit.sh @@ -23,8 +23,6 @@ COMMON_ENV=libexec/vespa/common-env.sh source_common_env () { if [ "$VESPA_HOME" ] && [ -d "$VESPA_HOME" ]; then - # ensure it ends with "/" : - VESPA_HOME=${VESPA_HOME%/}/ export VESPA_HOME common_env=$VESPA_HOME/$COMMON_ENV if [ -f "$common_env" ]; then diff --git a/vespaclient/src/perl/bin/GetClusterState.pl b/vespaclient/src/perl/bin/GetClusterState.pl index d95d2b58b9d..6dd36d9e131 100755 --- a/vespaclient/src/perl/bin/GetClusterState.pl +++ b/vespaclient/src/perl/bin/GetClusterState.pl @@ -4,7 +4,6 @@ # BEGIN perl environment bootstrap section # Do not edit between here and END as this section should stay identical in all scripts -use warnings; use File::Basename; use File::Path; @@ -55,7 +54,6 @@ sub findhome { BEGIN { my $tmp = findhome(); - if ( $tmp !~ m{[/]$} ) { $tmp .= "/"; } $ENV{'VESPA_HOME'} = $tmp; } my $VESPA_HOME = $ENV{'VESPA_HOME'}; diff --git a/vespaclient/src/perl/bin/GetNodeState.pl b/vespaclient/src/perl/bin/GetNodeState.pl index 4728bc6b524..f7ac5a24918 100755 --- a/vespaclient/src/perl/bin/GetNodeState.pl +++ b/vespaclient/src/perl/bin/GetNodeState.pl @@ -4,7 +4,6 @@ # BEGIN perl environment bootstrap section # Do not edit between here and END as this section should stay identical in all scripts -use warnings; use File::Basename; use File::Path; @@ -55,7 +54,6 @@ sub findhome { BEGIN { my $tmp = findhome(); - if ( $tmp !~ m{[/]$} ) { $tmp .= "/"; } $ENV{'VESPA_HOME'} = $tmp; } my $VESPA_HOME = $ENV{'VESPA_HOME'}; diff --git a/vespaclient/src/perl/bin/SetNodeState.pl b/vespaclient/src/perl/bin/SetNodeState.pl index e807c86d772..f5df40a2433 100755 --- a/vespaclient/src/perl/bin/SetNodeState.pl +++ b/vespaclient/src/perl/bin/SetNodeState.pl @@ -4,7 +4,6 @@ # BEGIN perl environment bootstrap section # Do not edit between here and END as this section should stay identical in all scripts -use warnings; use File::Basename; use File::Path; @@ -55,7 +54,6 @@ sub findhome { BEGIN { my $tmp = findhome(); - if ( $tmp !~ m{[/]$} ) { $tmp .= "/"; } $ENV{'VESPA_HOME'} = $tmp; } my $VESPA_HOME = $ENV{'VESPA_HOME'}; diff --git a/vespaclient/src/vespa/vespaclient/spoolmaster/application.cpp b/vespaclient/src/vespa/vespaclient/spoolmaster/application.cpp index 8c9dc9f65e2..0220f196185 100644 --- a/vespaclient/src/vespa/vespaclient/spoolmaster/application.cpp +++ b/vespaclient/src/vespa/vespaclient/spoolmaster/application.cpp @@ -12,13 +12,13 @@ namespace { std::string masterInbox() { std::string dir = vespa::Defaults::vespaHome(); - dir.append("var/spool/master/inbox"); + dir.append("/var/spool/master/inbox"); return dir; } std::string outboxParent() { std::string dir = vespa::Defaults::vespaHome(); - dir.append("var/spool/vespa"); + dir.append("/var/spool/vespa"); return dir; } diff --git a/vespalog/src/vespa-logfmt/vespa-logfmt.pl b/vespalog/src/vespa-logfmt/vespa-logfmt.pl index 42eef5a6727..725396c9458 100755 --- a/vespalog/src/vespa-logfmt/vespa-logfmt.pl +++ b/vespalog/src/vespa-logfmt/vespa-logfmt.pl @@ -54,7 +54,6 @@ sub findhome { BEGIN { my $tmp = findhome(); - if ( $tmp !~ m{[/]$} ) { $tmp .= "/"; } $ENV{'VESPA_HOME'} = $tmp; } my $VESPA_HOME = $ENV{'VESPA_HOME'}; diff --git a/zkfacade/src/main/sh/zkcat b/zkfacade/src/main/sh/zkcat index dd4adaa25d7..2504b77d085 100755 --- a/zkfacade/src/main/sh/zkcat +++ b/zkfacade/src/main/sh/zkcat @@ -23,8 +23,6 @@ COMMON_ENV=libexec/vespa/common-env.sh source_common_env () { if [ "$VESPA_HOME" ] && [ -d "$VESPA_HOME" ]; then - # ensure it ends with "/" : - VESPA_HOME=${VESPA_HOME%/}/ export VESPA_HOME common_env=$VESPA_HOME/$COMMON_ENV if [ -f "$common_env" ]; then diff --git a/zkfacade/src/main/sh/zkcli b/zkfacade/src/main/sh/zkcli index 6e276a83128..e2c7f66644a 100755 --- a/zkfacade/src/main/sh/zkcli +++ b/zkfacade/src/main/sh/zkcli @@ -23,8 +23,6 @@ COMMON_ENV=libexec/vespa/common-env.sh source_common_env () { if [ "$VESPA_HOME" ] && [ -d "$VESPA_HOME" ]; then - # ensure it ends with "/" : - VESPA_HOME=${VESPA_HOME%/}/ export VESPA_HOME common_env=$VESPA_HOME/$COMMON_ENV if [ -f "$common_env" ]; then diff --git a/zkfacade/src/main/sh/zkctl b/zkfacade/src/main/sh/zkctl index 69b29cc055f..d1234de26f1 100755 --- a/zkfacade/src/main/sh/zkctl +++ b/zkfacade/src/main/sh/zkctl @@ -23,8 +23,6 @@ COMMON_ENV=libexec/vespa/common-env.sh source_common_env () { if [ "$VESPA_HOME" ] && [ -d "$VESPA_HOME" ]; then - # ensure it ends with "/" : - VESPA_HOME=${VESPA_HOME%/}/ export VESPA_HOME common_env=$VESPA_HOME/$COMMON_ENV if [ -f "$common_env" ]; then diff --git a/zkfacade/src/main/sh/zkls b/zkfacade/src/main/sh/zkls index ac445d613cc..ccd2e546252 100755 --- a/zkfacade/src/main/sh/zkls +++ b/zkfacade/src/main/sh/zkls @@ -23,8 +23,6 @@ COMMON_ENV=libexec/vespa/common-env.sh source_common_env () { if [ "$VESPA_HOME" ] && [ -d "$VESPA_HOME" ]; then - # ensure it ends with "/" : - VESPA_HOME=${VESPA_HOME%/}/ export VESPA_HOME common_env=$VESPA_HOME/$COMMON_ENV if [ -f "$common_env" ]; then |