#!/bin/sh case "${reason}" in BOUND|INFORM|REBIND|REBOOT|RENEW|TIMEOUT|STATIC) # sync time as soon as connection is up # this reads nameserver from /etc/ntp.conf ntpd -q # alternatively use ntpdate and give hostname #ntpdate -u pool.ntp.org ;; PREINIT|EXPIRE|FAIL|IPV4LL|NAK|NOCARRIER|RELEASE|STOP) # do nothing here... ;; esac