stx-utilities: fix service name and binary paths
* fix the service name: network -> networking * fix the binary paths: - /usr/local/bin -> /usr/bin - /usr/local/sbin -> /usr/sbin Signed-off-by: Jackie Huang <jackie.huang@windriver.com> Signed-off-by: Babak Sarashki <Babak.SarAshki@windriver.com>
This commit is contained in:
parent
7b315cb812
commit
fa1efc1643
@ -13,6 +13,8 @@ S = "${S_DIR}/tools/engtools/hostdata-collectors/scripts"
|
||||
LICENSE = "Apache-2.0"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
|
||||
|
||||
SRC_URI += "file://collect-engtools-fix-service-name-binary-path.patch;striplevel=5"
|
||||
|
||||
RDEPENDS_collect-engtools += " \
|
||||
iperf3 \
|
||||
bash \
|
||||
|
@ -11,6 +11,8 @@ S = "${S_DIR}/tools/collector/scripts"
|
||||
LICENSE = "Apache-2.0"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
|
||||
|
||||
SRC_URI += "file://collector-fix-service-name-binary-path.patch;striplevel=4"
|
||||
|
||||
RDEPENDS_${PN}_append += " bash"
|
||||
|
||||
do_configure[noexec] = "1"
|
||||
|
@ -0,0 +1,40 @@
|
||||
diff --git a/tools/engtools/hostdata-collectors/scripts/cleanup-engtools.sh b/tools/engtools/hostdata-collectors/scripts/cleanup-engtools.sh
|
||||
index 5d5701b..a81ecab 100644
|
||||
--- a/tools/engtools/hostdata-collectors/scripts/cleanup-engtools.sh
|
||||
+++ b/tools/engtools/hostdata-collectors/scripts/cleanup-engtools.sh
|
||||
@@ -31,7 +31,7 @@ LOG "Cleanup engtools:"
|
||||
# Brute force methods (assume trouble with: service collect-engtools.sh stop)
|
||||
# ( be sure not to clobber /etc/init.d/collect-engtools.sh )
|
||||
LOG "kill processes brute force"
|
||||
-pids=( $(pidof -x /usr/local/bin/collect-engtools.sh) )
|
||||
+pids=( $(pidof -x /usr/bin//collect-engtools.sh) )
|
||||
if [ ${#pids[@]} -ne 0 ]; then
|
||||
LOG "killing: ${pids[@]}"
|
||||
for pid in ${pids[@]}; do
|
||||
diff --git a/tools/engtools/hostdata-collectors/scripts/collect-engtools.service b/tools/engtools/hostdata-collectors/scripts/collect-engtools.service
|
||||
index e00e1cd..6d4ae65 100644
|
||||
--- a/tools/engtools/hostdata-collectors/scripts/collect-engtools.service
|
||||
+++ b/tools/engtools/hostdata-collectors/scripts/collect-engtools.service
|
||||
@@ -1,7 +1,7 @@
|
||||
[Unit]
|
||||
Description=Engineering data collection tools to monitor host performance
|
||||
-Requires=network.service
|
||||
-After=network.service getty.target
|
||||
+Requires=networking.service
|
||||
+After=networking.service getty.target
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
diff --git a/tools/engtools/hostdata-collectors/scripts/collect-engtools.sh b/tools/engtools/hostdata-collectors/scripts/collect-engtools.sh
|
||||
index e59f382..3140297 100644
|
||||
--- a/tools/engtools/hostdata-collectors/scripts/collect-engtools.sh
|
||||
+++ b/tools/engtools/hostdata-collectors/scripts/collect-engtools.sh
|
||||
@@ -263,7 +263,7 @@ OPT_USE_INTERVALS=0
|
||||
# Define parallel engtools configuration
|
||||
# - tool name, filename, and collection interval attributes
|
||||
BINDIR=/usr/bin
|
||||
-LBINDIR=/usr/local/bin
|
||||
+LBINDIR=/usr/bin/
|
||||
|
||||
. /etc/engtools/engtools.conf
|
||||
|
@ -0,0 +1,336 @@
|
||||
diff --git a/tools/collector/scripts/collect b/tools/collector/scripts/collect
|
||||
index 88e373e..666df9e 100755
|
||||
--- a/tools/collector/scripts/collect
|
||||
+++ b/tools/collector/scripts/collect
|
||||
@@ -83,7 +83,7 @@ if [ ${UID} -eq 0 ]; then
|
||||
fi
|
||||
|
||||
# pull in common utils and environment
|
||||
-source /usr/local/sbin/collect_utils
|
||||
+source /usr/sbin/collect_utils
|
||||
source_openrc_if_needed
|
||||
|
||||
function clean_up()
|
||||
@@ -121,7 +121,7 @@ SCP_TIMEOUT="600"
|
||||
SSH_CMD="ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o PreferredAuthentications=password -o PubkeyAuthentication=no"
|
||||
NOWDATE=`date +"%Y%m%d.%H%M%S"`
|
||||
COLLECT_BASE_DIR="/scratch"
|
||||
-collect_host="/usr/local/sbin/collect_host"
|
||||
+collect_host="/usr/sbin/collect_host"
|
||||
CURR_DIR=`pwd`
|
||||
|
||||
|
||||
diff --git a/tools/collector/scripts/collect_ceph.sh b/tools/collector/scripts/collect_ceph.sh
|
||||
index 1a5863e..d4dbcfc 100755
|
||||
--- a/tools/collector/scripts/collect_ceph.sh
|
||||
+++ b/tools/collector/scripts/collect_ceph.sh
|
||||
@@ -7,8 +7,8 @@
|
||||
|
||||
|
||||
# Loads Up Utilities and Commands Variables
|
||||
-source /usr/local/sbin/collect_parms
|
||||
-source /usr/local/sbin/collect_utils
|
||||
+source /usr/sbin/collect_parms
|
||||
+source /usr/sbin/collect_utils
|
||||
|
||||
SERVICE="ceph"
|
||||
LOGFILE="${extradir}/ceph.info"
|
||||
diff --git a/tools/collector/scripts/collect_containerization.sh b/tools/collector/scripts/collect_containerization.sh
|
||||
index d2e5a92..fb2fa7a 100755
|
||||
--- a/tools/collector/scripts/collect_containerization.sh
|
||||
+++ b/tools/collector/scripts/collect_containerization.sh
|
||||
@@ -8,8 +8,8 @@
|
||||
|
||||
# Loads Up Utilities and Commands Variables
|
||||
|
||||
-source /usr/local/sbin/collect_parms
|
||||
-source /usr/local/sbin/collect_utils
|
||||
+source /usr/sbin/collect_parms
|
||||
+source /usr/sbin/collect_utils
|
||||
|
||||
SERVICE="containerization"
|
||||
LOGFILE="${extradir}/${SERVICE}.info"
|
||||
diff --git a/tools/collector/scripts/collect_coredump.sh b/tools/collector/scripts/collect_coredump.sh
|
||||
index 7614909..7702ef2 100644
|
||||
--- a/tools/collector/scripts/collect_coredump.sh
|
||||
+++ b/tools/collector/scripts/collect_coredump.sh
|
||||
@@ -8,8 +8,8 @@
|
||||
|
||||
# Loads Up Utilities and Commands Variables
|
||||
|
||||
-source /usr/local/sbin/collect_parms
|
||||
-source /usr/local/sbin/collect_utils
|
||||
+source /usr/sbin/collect_parms
|
||||
+source /usr/sbin/collect_utils
|
||||
|
||||
SERVICE="coredump"
|
||||
LOGFILE="${extradir}/${SERVICE}.info"
|
||||
diff --git a/tools/collector/scripts/collect_crash.sh b/tools/collector/scripts/collect_crash.sh
|
||||
index fc8c798..c768306 100644
|
||||
--- a/tools/collector/scripts/collect_crash.sh
|
||||
+++ b/tools/collector/scripts/collect_crash.sh
|
||||
@@ -8,8 +8,8 @@
|
||||
|
||||
# Loads Up Utilities and Commands Variables
|
||||
|
||||
-source /usr/local/sbin/collect_parms
|
||||
-source /usr/local/sbin/collect_utils
|
||||
+source /usr/sbin/collect_parms
|
||||
+source /usr/sbin/collect_utils
|
||||
|
||||
SERVICE="crash"
|
||||
LOGFILE="${extradir}/${SERVICE}.info"
|
||||
diff --git a/tools/collector/scripts/collect_date b/tools/collector/scripts/collect_date
|
||||
index 22c62fb..60724b8 100755
|
||||
--- a/tools/collector/scripts/collect_date
|
||||
+++ b/tools/collector/scripts/collect_date
|
||||
@@ -34,8 +34,8 @@
|
||||
#
|
||||
# Calling sequence:
|
||||
#
|
||||
-# /usr/local/sbin/collect_date <start_date> <end_date> <include_list> <debug>
|
||||
-# /usr/local/sbin/collect_date 20170701 20170901 /tmp/file.list true
|
||||
+# /usr/sbin/collect_date <start_date> <end_date> <include_list> <debug>
|
||||
+# /usr/sbin/collect_date 20170701 20170901 /tmp/file.list true
|
||||
#
|
||||
########################################################################
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
# Import commands, variables and convenience functions available to
|
||||
# all collectors ; common and user defined.
|
||||
#
|
||||
-source /usr/local/sbin/collect_utils
|
||||
+source /usr/sbin/collect_utils
|
||||
|
||||
# where to find the logs
|
||||
declare -r baselogdir="/var/log"
|
||||
diff --git a/tools/collector/scripts/collect_fm.sh b/tools/collector/scripts/collect_fm.sh
|
||||
index 4ef489a..9ea432b 100644
|
||||
--- a/tools/collector/scripts/collect_fm.sh
|
||||
+++ b/tools/collector/scripts/collect_fm.sh
|
||||
@@ -6,8 +6,8 @@
|
||||
|
||||
# Loads Up Utilities and Commands Variables
|
||||
|
||||
-source /usr/local/sbin/collect_parms
|
||||
-source /usr/local/sbin/collect_utils
|
||||
+source /usr/sbin/collect_parms
|
||||
+source /usr/sbin/collect_utils
|
||||
|
||||
SERVICE="alarms"
|
||||
LOGFILE="${extradir}/${SERVICE}.info"
|
||||
diff --git a/tools/collector/scripts/collect_host b/tools/collector/scripts/collect_host
|
||||
index e94177a..9a47763 100755
|
||||
--- a/tools/collector/scripts/collect_host
|
||||
+++ b/tools/collector/scripts/collect_host
|
||||
@@ -26,7 +26,7 @@ export ACTIVE=false
|
||||
# Import commands, variables and convenience functions available to
|
||||
# all collectors ; common and user defined.
|
||||
#
|
||||
-source /usr/local/sbin/collect_utils
|
||||
+source /usr/sbin/collect_utils
|
||||
source_openrc_if_needed
|
||||
|
||||
#
|
||||
@@ -83,7 +83,7 @@ FLIGHT_RECORDER_FILE="sm.eru.v1"
|
||||
VAR_LOG_INCLUDE_LIST="/tmp/${COLLECT_NAME}.lst"
|
||||
COLLECT_DIR_PCENT_CMD="df --output=pcent ${COLLECT_BASE_DIR}"
|
||||
COLLECT_DIR_USAGE_CMD="df -h ${COLLECT_BASE_DIR}"
|
||||
-COLLECT_DATE="/usr/local/sbin/collect_date"
|
||||
+COLLECT_DATE="/usr/sbin/collect_date"
|
||||
|
||||
function log_space()
|
||||
{
|
||||
@@ -440,8 +440,8 @@ log_space "after delete tar ....:"
|
||||
|
||||
if [ "${SKIP_MASK}" != "true" ]; then
|
||||
# Run password masking before final tar
|
||||
- dlog "running /usr/local/sbin/collect_mask_passwords ${COLLECT_NAME_DIR} ${EXTRA_DIR}"
|
||||
- /usr/local/sbin/collect_mask_passwords ${COLLECT_NAME_DIR} ${EXTRA_DIR}
|
||||
+ dlog "running /usr/sbin/collect_mask_passwords ${COLLECT_NAME_DIR} ${EXTRA_DIR}"
|
||||
+ /usr/sbin/collect_mask_passwords ${COLLECT_NAME_DIR} ${EXTRA_DIR}
|
||||
log_space "after passwd masking :"
|
||||
fi
|
||||
|
||||
diff --git a/tools/collector/scripts/collect_ima.sh b/tools/collector/scripts/collect_ima.sh
|
||||
index 14c751e..0ac63b3 100755
|
||||
--- a/tools/collector/scripts/collect_ima.sh
|
||||
+++ b/tools/collector/scripts/collect_ima.sh
|
||||
@@ -7,8 +7,8 @@
|
||||
|
||||
|
||||
# Loads Up Utilities and Commands Variables
|
||||
-source /usr/local/sbin/collect_parms
|
||||
-source /usr/local/sbin/collect_utils
|
||||
+source /usr/sbin/collect_parms
|
||||
+source /usr/sbin/collect_utils
|
||||
|
||||
function is_extended_profile {
|
||||
if [ ! -n "${security_profile}" ] || [ "${security_profile}" != "extended" ]; then
|
||||
diff --git a/tools/collector/scripts/collect_networking.sh b/tools/collector/scripts/collect_networking.sh
|
||||
index 98f4136..140e85d 100755
|
||||
--- a/tools/collector/scripts/collect_networking.sh
|
||||
+++ b/tools/collector/scripts/collect_networking.sh
|
||||
@@ -8,8 +8,8 @@
|
||||
|
||||
# Loads Up Utilities and Commands Variables
|
||||
|
||||
-source /usr/local/sbin/collect_parms
|
||||
-source /usr/local/sbin/collect_utils
|
||||
+source /usr/sbin/collect_parms
|
||||
+source /usr/sbin/collect_utils
|
||||
|
||||
SERVICE="networking"
|
||||
LOGFILE="${extradir}/${SERVICE}.info"
|
||||
diff --git a/tools/collector/scripts/collect_nfv_vim.sh b/tools/collector/scripts/collect_nfv_vim.sh
|
||||
index c5ccbc7..37189c5 100644
|
||||
--- a/tools/collector/scripts/collect_nfv_vim.sh
|
||||
+++ b/tools/collector/scripts/collect_nfv_vim.sh
|
||||
@@ -6,8 +6,8 @@
|
||||
#
|
||||
|
||||
# Loads Up Utilities and Commands Variables
|
||||
-source /usr/local/sbin/collect_parms
|
||||
-source /usr/local/sbin/collect_utils
|
||||
+source /usr/sbin/collect_parms
|
||||
+source /usr/sbin/collect_utils
|
||||
|
||||
LOGFILE="${extradir}/nfv-vim.info"
|
||||
echo "${hostname}: NFV-Vim Info ......: ${LOGFILE}"
|
||||
diff --git a/tools/collector/scripts/collect_openstack.sh b/tools/collector/scripts/collect_openstack.sh
|
||||
index e03eca8..a14c8f3 100755
|
||||
--- a/tools/collector/scripts/collect_openstack.sh
|
||||
+++ b/tools/collector/scripts/collect_openstack.sh
|
||||
@@ -7,8 +7,8 @@
|
||||
|
||||
|
||||
# Loads Up Utilities and Commands Variables
|
||||
-source /usr/local/sbin/collect_parms
|
||||
-source /usr/local/sbin/collect_utils
|
||||
+source /usr/sbin/collect_parms
|
||||
+source /usr/sbin/collect_utils
|
||||
|
||||
function is_service_active {
|
||||
active=`sm-query service rabbit-fs | grep "enabled-active"`
|
||||
diff --git a/tools/collector/scripts/collect_ovs.sh b/tools/collector/scripts/collect_ovs.sh
|
||||
index 94e98e6..cdf4680 100644
|
||||
--- a/tools/collector/scripts/collect_ovs.sh
|
||||
+++ b/tools/collector/scripts/collect_ovs.sh
|
||||
@@ -9,8 +9,8 @@
|
||||
|
||||
# Loads Up Utilities and Commands Variables
|
||||
|
||||
-source /usr/local/sbin/collect_parms
|
||||
-source /usr/local/sbin/collect_utils
|
||||
+source /usr/sbin/collect_parms
|
||||
+source /usr/sbin/collect_utils
|
||||
|
||||
SERVICE="ovs"
|
||||
LOGFILE="${extradir}/${SERVICE}.info"
|
||||
diff --git a/tools/collector/scripts/collect_patching.sh b/tools/collector/scripts/collect_patching.sh
|
||||
index 3d696d2..05ba41e 100755
|
||||
--- a/tools/collector/scripts/collect_patching.sh
|
||||
+++ b/tools/collector/scripts/collect_patching.sh
|
||||
@@ -7,8 +7,8 @@
|
||||
|
||||
|
||||
# Loads Up Utilities and Commands Variables
|
||||
-source /usr/local/sbin/collect_parms
|
||||
-source /usr/local/sbin/collect_utils
|
||||
+source /usr/sbin/collect_parms
|
||||
+source /usr/sbin/collect_utils
|
||||
|
||||
SERVICE="patching"
|
||||
LOGFILE="${extradir}/${SERVICE}.info"
|
||||
diff --git a/tools/collector/scripts/collect_psqldb.sh b/tools/collector/scripts/collect_psqldb.sh
|
||||
index d223b1b..dc45169 100755
|
||||
--- a/tools/collector/scripts/collect_psqldb.sh
|
||||
+++ b/tools/collector/scripts/collect_psqldb.sh
|
||||
@@ -7,8 +7,8 @@
|
||||
|
||||
|
||||
# Loads Up Utilities and Commands Variables
|
||||
-source /usr/local/sbin/collect_parms
|
||||
-source /usr/local/sbin/collect_utils
|
||||
+source /usr/sbin/collect_parms
|
||||
+source /usr/sbin/collect_utils
|
||||
|
||||
# postgres database commands
|
||||
PSQL_CMD="sudo -u postgres psql --pset pager=off -q"
|
||||
diff --git a/tools/collector/scripts/collect_sm.sh b/tools/collector/scripts/collect_sm.sh
|
||||
index 5f0f3c9..6de18fe 100644
|
||||
--- a/tools/collector/scripts/collect_sm.sh
|
||||
+++ b/tools/collector/scripts/collect_sm.sh
|
||||
@@ -7,8 +7,8 @@
|
||||
|
||||
|
||||
# Loads Up Utilities and Commands Variables
|
||||
-source /usr/local/sbin/collect_parms
|
||||
-source /usr/local/sbin/collect_utils
|
||||
+source /usr/sbin/collect_parms
|
||||
+source /usr/sbin/collect_utils
|
||||
|
||||
SERVICE="sm"
|
||||
LOGFILE="${extradir}/sm.info"
|
||||
diff --git a/tools/collector/scripts/collect_sysinv.sh b/tools/collector/scripts/collect_sysinv.sh
|
||||
index 3f27a28..6a9f4ae 100755
|
||||
--- a/tools/collector/scripts/collect_sysinv.sh
|
||||
+++ b/tools/collector/scripts/collect_sysinv.sh
|
||||
@@ -7,8 +7,8 @@
|
||||
|
||||
|
||||
# Loads Up Utilities and Commands Variables
|
||||
-source /usr/local/sbin/collect_parms
|
||||
-source /usr/local/sbin/collect_utils
|
||||
+source /usr/sbin/collect_parms
|
||||
+source /usr/sbin/collect_utils
|
||||
|
||||
SERVICE="inventory"
|
||||
LOGFILE="${extradir}/${SERVICE}.info"
|
||||
diff --git a/tools/collector/scripts/collect_tc.sh b/tools/collector/scripts/collect_tc.sh
|
||||
index 95cd0fe..0ee6bd8 100755
|
||||
--- a/tools/collector/scripts/collect_tc.sh
|
||||
+++ b/tools/collector/scripts/collect_tc.sh
|
||||
@@ -7,8 +7,8 @@
|
||||
|
||||
|
||||
# Loads Up Utilities and Commands Variables
|
||||
-source /usr/local/sbin/collect_parms
|
||||
-source /usr/local/sbin/collect_utils
|
||||
+source /usr/sbin/collect_parms
|
||||
+source /usr/sbin/collect_utils
|
||||
|
||||
SERVICE="tc"
|
||||
LOGFILE="${extradir}/tc.info"
|
||||
@@ -40,13 +40,13 @@ for i in $(ip link | grep mtu | grep eth |awk '{print $2}' | sed 's#:##g'); do
|
||||
done
|
||||
|
||||
###############################################################################
|
||||
-# TC Configuration Script (/usr/local/bin/tc_setup.sh)
|
||||
+# TC Configuration Script (/usr/bin/tc_setup.sh)
|
||||
###############################################################################
|
||||
-delimiter ${LOGFILE} "cat /usr/local/bin/tc_setup.sh"
|
||||
-if [ -f /usr/local/bin/tc_setup.sh ]; then
|
||||
- cat /usr/local/bin/tc_setup.sh >> ${LOGFILE} 2>>${COLLECT_ERROR_LOG}
|
||||
+delimiter ${LOGFILE} "cat /usr/bin/tc_setup.sh"
|
||||
+if [ -f /usr/bin/tc_setup.sh ]; then
|
||||
+ cat /usr/bin/tc_setup.sh >> ${LOGFILE} 2>>${COLLECT_ERROR_LOG}
|
||||
else
|
||||
- echo "/usr/local/bin/tc_setup.sh NOT FOUND" >> ${LOGFILE}
|
||||
+ echo "/usr/bin/tc_setup.sh NOT FOUND" >> ${LOGFILE}
|
||||
fi
|
||||
|
||||
###############################################################################
|
||||
diff --git a/tools/collector/scripts/collect_utils b/tools/collector/scripts/collect_utils
|
||||
index 739e161..53ad5c3 100755
|
||||
--- a/tools/collector/scripts/collect_utils
|
||||
+++ b/tools/collector/scripts/collect_utils
|
||||
@@ -90,7 +90,7 @@ function source_openrc_if_needed
|
||||
# sequences and highlight command completion
|
||||
collect_done="collect done"
|
||||
cmd_done_sig="expect done"
|
||||
-cmd_done_file="/usr/local/sbin/expect_done"
|
||||
+cmd_done_file="/usr/sbin/expect_done"
|
||||
|
||||
# Compression Commands
|
||||
TAR_ZIP_CMD="tar -cvzf"
|
Loading…
Reference in New Issue
Block a user