This node is to be used in conjunction with the git repository for the default nodes

On the drp-neh-ctl002 machine pull the latest version of the default node files from git and run:
clush --mode sudo -w drp_name node_install.sh

where drp name is the name of the node one wants to install the files

This will install the files in the proper location and run the following special commands:
chmod -x /usr/lib/systemd/system/tdetsim.service
chmod -x /usr/lib/systemd/system/kcu.service
systemctl disable irqbalance.service
systemctl daemon-reload
if [ $NODE_LABEL == 'DrpTDet' ];then
    systemctl start tdetsim.service
else
    systemctl start kcu.service
fi  

#!/bin/bash

PATH_SCRIPTS=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
NODE_LABEL1=$(cat /proc/datadev_0 | grep 'Build String' | cut -d ' ' -f 13)
NODE_LABEL=${NODE_LABEL1::-1}
HOST=$(echo $(hostname)| cut -d'_' -f 2)
input="$PATH_SCRIPTS/file_list.json"
count=$(jq '.driver | length' "$input")

for ((i=0; i<$count; i++)); do
	VARIABLE=$(jq -r .driver["$i"].driver_name "$input")
	INSTALL_FOLDER=$(jq -r .driver["$i"].install_path "$input")
	ACTIVE=$(jq -r .driver["$i"].active "$input")
	echo "$PATH_SCRIPTS/$VARIABLE" "$INSTALL_FOLDER" "$ACTIVE"
	if [ $ACTIVE == "True" ]; then
		if [ $VARIABLE == "datadev.ko" ];
			then cp "$PATH_SCRIPTS/$VARIABLE_$HOST" "$INSTALL_FOLDER/$VARIABLE"
		else
			cp "$PATH_SCRIPTS/$VARIABLE" "$INSTALL_FOLDER/"
	fi
done < "$input"

chmod -x /usr/lib/systemd/system/tdetsim.service
chmod -x /usr/lib/systemd/system/kcu.service
systemctl disable irqbalance.service
systemctl daemon-reload
if [ $NODE_LABEL == 'DrpTDet' ];then
	systemctl start tdetsim.service
else
	systemctl start kcu.service
fi  
  • No labels