Last active
August 29, 2015 14:15
-
-
Save skiane/ed1b05399c18f531e7ae to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ZONE='' | |
# Source this file to get system timezone on CentOS/RHEL | |
test -f /etc/sysconfig/clock && . /etc/sysconfig/clock | |
# Read /etc/timezone on Debian | |
test -f /etc/timezone && ZONE=$(cat /etc/timezone) | |
# This is for CentOS7 | |
test -x /usr/bin/timedatectl && ZONE=$(/usr/bin/timedatectl |grep -i timezone | awk '{print $2}' ) | |
if [ ! -z "$ZONE" ] | |
then | |
racadm set iDRAC.time.timezone "$ZONE" | |
fi | |
racadm set iDRAC.NtPConfigGroup.NTP1 pool.ntp.org | |
racadm set iDRAC.NtPConfigGroup.NTPEnable enabled |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment