Free web development scripts for the webmasterDevelopment Scripts

 Site Navigation
 o Development Scripts
 o Text Only Edition
 o PHP.net News
 o Tutorials
 o Register an account
 o New entries this week
 o Affiliates/Links
 o Contact Us
 o About us
 o Advanced Search

 Browse Path
 o 3 users online
 o Most users online: 67
 o Home
  o Shell
   o Miscellaneous
    o Script

 Member Login
User Name
Password

 Standards
Valid XHTML 1.0!
Valid 
CSS!

 Recommended Links
 o PHP Freaks
 o Designer Baby Clothes
 o Advertise Here Make Money
 o Wedding Vendor Directory
 o devnet
 o Open Source Design
 o OxyScripts
 o designplace
 o Free Wedding Websites

Keeping Great Time (Rated 0)

Description:

Update system clock from Demon ntp server and write new date to CMOS if successful

Code starts here


#!/bin/sh
# clock-sync: update system clock from Demon ntp server;
# and write new date to CMOS if successful

PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin
progname=`basename $0`
if netdate tcp ntp.demon.co.uk|logger -p local0.notice -t clock-sync
then
hwclock --systohc --utc
exit 0
else
logger -p local0.notice "$progname failed" -t clock-sync
exit 1
fi


Submitted by Devscripts on 27-02-2003 20:55


Rate This Script

User Contributed Comments

Registered Members login
© Copyright 2003 - Devscripts.net