#!/bin/sh # Copyright (C) 2005,2006,2007 Krzysztof Kozlowski # License: GNU General Public License version 2 # http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # version 2 as published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # Ostatnia zmiana: 5.01.2007 # # Sync clock # testowany na: # - FreeBSD 5.x # - Linux (Gentoo /net-misc/ntp/, Fedora) # # Servers (see /etc/ntp.conf) : SERVERS="vega.cbk.poznan.pl nz11.rz.uni-karlsruhe.de mx1.gs.washington.edu ntp.signet.pl" OUTPUT=`/usr/sbin/ntpdate -u $SERVERS 2>&1` STATUS=$? if [ "$1" = "-v" ] || [ $STATUS -ne 0 ] then echo $OUTPUT fi