#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local

JAVA_HOME=/usr/java/latest
export JAVA_HOME
PATH=${JAVA_HOME}/bin:$PATH
export PATH

hostname | egrep -q "dbserver|infraserver" && {
	java -jar /opt/SPECpoll/pollme.jar -n `hostname`-int -p 8001 > /tmp/pollme.out 2>&1&
}

hostname | egrep -q "mailserver|idleserver" && {
	java -jar /opt/SPECpoll/pollme.jar -n `hostname`-ext -p 8001 > /tmp/pollme.out 2>&1&
}

hostname | egrep -q "appserver" && {
	java -jar /opt/SPECpoll/pollme.jar -n `hostname`-ext -app -p 8001 > /tmp/pollme.out 2>&1&
}

hostname | egrep -q "webserver" && {
	java -jar /opt/SPECpoll/pollme.jar -n `hostname`-ext -web -p 8001 > /tmp/pollme.out 2>&1&
}

# Check NIC changes
/opt/common_scripts/update_udev_rules_net.sh

# Various workload specific tunings 
/opt/common_scripts/ostune_misc.sh

