2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-29 17:23:08 +00:00

Remove trailing spaces in file xCAT-genesis-scripts/usr/bin/doxcat

This commit is contained in:
GONG Jie 2017-12-31 23:59:59 +00:00
parent a1a9d1b460
commit 8cf5ac93a7

View File

@ -6,14 +6,14 @@
log_label="xcat.genesis.doxcat"
# Start rsyslogd and log into a local file specified in /etc/rsyslog.conf
# Later, once xCAT MN is known, dhclient-script will change
# Later, once xCAT MN is known, dhclient-script will change
# rsyslog.conf file to send log entries to xCAT MN
RSYSLOGD_VERSION=`rsyslogd -v | grep "rsyslogd" | cut -d" " -f2 | cut -d"." -f1`
# if syslog is running and there's a pid file, kill it before restarting syslogd
if [ -f /var/run/syslogd.pid ]; then
if [ -f /var/run/syslogd.pid ]; then
kill -TERM `cat /var/run/syslogd.pid`
fi
fi
if [ $RSYSLOGD_VERSION -ge 8 ]; then
/sbin/rsyslogd
@ -27,7 +27,7 @@ logger -s -t $log_label -p local4.info "Beginning doxcat process..."
modprobe acpi_cpufreq 2>/dev/null # on some machines this fails
modprobe cpufreq_ondemand
if ls /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor &>/dev/null; then
if grep -q ondemand /sys/devices/system/cpu/cpu*/cpufreq/scaling_available_governors; then
if grep -q ondemand /sys/devices/system/cpu/cpu*/cpufreq/scaling_available_governors; then
for gov in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor; do
echo -n ondemand > $gov
done
@ -37,7 +37,7 @@ if [ ! -z "$BOOTIF" ]; then
BOOTIF=`echo $BOOTIF|sed -e s/01-// -e s/-/:/g`
logger -s -t $log_label -p local4.info "Waiting for device with address $BOOTIF to appear.."
gripeiter=6000
while [ -z "$bootnic" ]; do
while [ -z "$bootnic" ]; do
bootnic=`ip link show|grep -B1 $BOOTIF|grep mtu|awk '{print $2}'|sed -e 's/:$//'`
sleep 0.1
if [ $gripeiter = 0 ]; then
@ -208,7 +208,7 @@ else
tries=$(($tries+1))
done
logger -s -t $log_label -p local4.info "Acquiring network addresses.."
logger -s -t $log_label -p local4.info "Acquiring network addresses.."
tries=0
while [ -z "$bootnic" ]; do
for tmp1 in $ALLUP_NICS; do
@ -263,7 +263,7 @@ logger -s -t $log_label -p local4.info "Acquired IPv4 address on $bootnic"
ip -4 -o a show dev $bootnic|grep -v 'scope link'|grep -v 'dynamic'|awk '{print $4}'
logger -s -t $log_label -p local4.info "Starting ntpd..."
logger -s -t $log_label -p local4.info "Starting ntpd..."
ntpd -g -x
# ntp-wait defaults to 6 seconds between retries, wait for 1 minute
@ -330,7 +330,7 @@ while :; do
if [ -z "$destiny" -o -n "$grepconfigraid" ]; then
logger -s -t $log_label -p local4.info "Running getdestiny --> $XCATMASTER:$XCATPORT"
destiny=`getdestiny $XCATMASTER:$XCATPORT`
logger -s -t $log_label -p local4.info "Received destiny=$destiny"
logger -s -t $log_label -p local4.info "Received destiny=$destiny"
fi
# parse out some values from the destiny
@ -358,7 +358,7 @@ while :; do
/bin/bash
logger -s -t $log_label -p local4.info "Exited shell."
logger -s -t $log_label -p local4.info "Running nextdestiny $XCATMASTER:$XCATPORT..."
/bin/nextdestiny $XCATMASTER:$XCATPORT
/bin/nextdestiny $XCATMASTER:$XCATPORT
logger -s -t $log_label -p local4.info "nextdestiny - Complete."
elif [ "$dest" = osimage ]; then
logger -s -t $log_label -p local4.info "Running nextdestiny $XCATMASTER:$XCATPORT..."
@ -421,11 +421,11 @@ while :; do
/bin/dosysclone
logger -s -t $log_label -p local4.info "dosysclone - Complete."
destiny=''
dest=''
dest=''
elif [ "$dest" = standby ]; then
delay=$((30+$RANDOM%270))
while [ $delay -gt 0 ]; do
if [ $((delay%10)) == 0 ]; then
if [ $((delay%10)) == 0 ]; then
if [ "$XCAT_DISCOVERY_WAS_DONE" == 1 ]; then
logger -s -t $log_label -p local4.info "Received request=$dest, will call xCAT back in $delay seconds. Discovery is complete, run nodeset on this node to provision an Operating System"
else
@ -441,7 +441,7 @@ while :; do
elif [ "$dest" = shutdown ]; then
logger -s -t $log_label -p local4.info "Poweroff..."
poweroff -f
else
else
if [ "$dest" = error ]; then
logger -s -t $log_label -p local4.info "$destparameter"
else
@ -451,7 +451,7 @@ while :; do
dest=''
delay=$((30+$RANDOM%270))
while [ $delay -gt 0 ]; do
if [ $((delay%10)) == 0 ]; then
if [ $((delay%10)) == 0 ]; then
logger -s -t $log_label -p local4.info "... Will retry xCAT in $delay seconds"
fi
delay=$((delay-1))