xymon-ext-scripts

Check-in [c0dba09309]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Quote variable to prevent word splitting
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | master | trunk
Files: files | file ages | folders
SHA3-256: c0dba09309a74c0cf7af4cec951889e60a587f422da1d5dc7da084489b162173
User & Date: feld@feld.me 2015-03-16 13:03:03
Context
2015-03-16
13:08
the COLOR export could get lost because of the subshell check-in: de2a6e7bac user: feld@feld.me tags: master, trunk
13:03
Quote variable to prevent word splitting check-in: c0dba09309 user: feld@feld.me tags: master, trunk
13:01
Consolidate redirection check-in: 8724c39bb0 user: feld@feld.me tags: master, trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to smart.sh.

65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
		*)
			echo "&red ${i} FAILED [ Serial: ${SERIAL} Model: ${MODEL} Reallocated: ${REALLOCATED} ]"
	esac
done)

STATUS="$(hostname) SMART health status"

if (echo ${MSG} | grep -q FAILED); then
	COLOR=red
else
	COLOR=green
fi

${XYMON} ${XYMSRV} "status ${MACHINE}.${COLUMN} ${COLOR} $(date)

${STATUS}

${MSG}
"







|











65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
		*)
			echo "&red ${i} FAILED [ Serial: ${SERIAL} Model: ${MODEL} Reallocated: ${REALLOCATED} ]"
	esac
done)

STATUS="$(hostname) SMART health status"

if (echo "${MSG}" | grep -q FAILED); then
	COLOR=red
else
	COLOR=green
fi

${XYMON} ${XYMSRV} "status ${MACHINE}.${COLUMN} ${COLOR} $(date)

${STATUS}

${MSG}
"