home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / etc / network / if-up.d / ntpdate < prev    next >
Encoding:
Text File  |  2007-03-07  |  462 b   |  20 lines

  1. #!/bin/sh
  2.  
  3. if [ ! -x /usr/sbin/ntpdate-debian ]; then
  4.     exit 0
  5. fi
  6.  
  7. if [ "$METHOD" = loopback ]; then
  8.     exit 0
  9. fi
  10.  
  11. # This is a heuristic:  The idea is that if a static interface is brought
  12. # up, that is a major event, and we can put in some extra effort to fix
  13. # the system time.  Feel free to change this, especially if you regularly
  14. # bring up new network interfaces.
  15. if [ "$METHOD" = static ]; then
  16.     OPTS="-b"
  17. fi
  18.  
  19. /usr/sbin/ntpdate-debian -s $OPTS 2>/dev/null &
  20.