2007-10-26 22:44:33 +00:00
|
|
|
#!/bin/ksh
|
|
|
|
# IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html
|
|
|
|
#(C)IBM Corp
|
|
|
|
#
|
|
|
|
|
|
|
|
. $XCATROOT/lib/functions
|
|
|
|
|
|
|
|
if TIMESERVERS=$(tabdb $SITETAB timeservers 1)
|
|
|
|
then
|
|
|
|
:
|
|
|
|
else
|
2012-05-15 03:20:08 +00:00
|
|
|
echo "$0: timeservers not defined in $SITETAB" | logger -t xcat -p local4.err
|
2007-10-26 22:44:33 +00:00
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
|
|
|
T=$(echo $TIMESERVERS | awk -F, '{print $1}')
|
|
|
|
|
|
|
|
if [ -n "$T" -a "$T" != "NA" ]
|
|
|
|
then
|
2012-05-15 03:20:08 +00:00
|
|
|
logger -t xcat -p local4.info "Install: sync clock"
|
|
|
|
ntpdate -bs $T 2>&1 | logger -t xcat -p local4.info
|
2007-10-26 22:44:33 +00:00
|
|
|
|
2012-05-15 03:20:08 +00:00
|
|
|
logger -t xcat "$0: the OS version is $OSVER" -p local4.info
|
2007-10-26 22:44:33 +00:00
|
|
|
case "$OSVER" in
|
|
|
|
rh9|rh[awe]s[34]|rh*5)
|
2012-05-15 03:20:08 +00:00
|
|
|
hwclock -w 2>&1 | logger -t xcat -p local4.info
|
2007-10-26 22:44:33 +00:00
|
|
|
;;
|
|
|
|
rh*)
|
2012-05-15 03:20:08 +00:00
|
|
|
setclock 2>&1 | logger -t xcat -p local4.info
|
2007-10-26 22:44:33 +00:00
|
|
|
;;
|
|
|
|
sles*|suse8*|suse9*|suse10)
|
2012-05-15 03:20:08 +00:00
|
|
|
clock -w 2>&1 | logger -t xcat -p local4.info
|
2007-10-26 22:44:33 +00:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
|
|
|
|
|