2 ################################################################################
5 # Description: This script will fix /etc/rc.config.d/netdaemons to set
6 # NTPDATE_SERVER to cupertino.ntp.hp.com
7 # Author: Andrew DeFaria (defaria@cup.hp.com)
11 # (c) Copyright 2001, Andrew@DeFaria.com, all rights reserved
13 ################################################################################
14 # First source /app/appserver
15 if [ -x /app/appserver ]; then
19 if [ $(id -u) -ne 0 ]; then
20 print -u2 "Error: You must be root to execute this command!"
24 if [ "$OS" = "09" ]; then
25 print -u2 "Error: $(basename $0) does not run on 9.x!"
29 netdaemons=/etc/rc.config.d/netdaemons
30 netdaemons_new=/etc/rc.config.d/netdaemons.$$
32 sed 's/NTPDATE_SERVER=$/NTPDATE_SERVER=cupertino.ntp.hp.com/' \
33 $netdaemons > $netdaemons_new
35 if cmp -s $netdaemons $netdaemons_new; then
37 print "NTPDATE_SERVER already set properly - No fix needed!"
39 mv $netdaemons_new $netdaemons
41 chown bin:bin $netdaemons
42 print "Changed NTPDATE_SERVER to be set properly"