#!/bin/bash NTP_FILE="/etc/ntp.conf" gen_conf(){ llxcfg-cpkg plainview $NTP_FILE |sed -e "/^[[:blank:]]*server\b/d" echo "## LliureX" for s in $NTP_SERVERS ; do echo "server ${s} iburst" done echo "## LliureX" } # ---- # main # ---- # load vars VAR_LIST="NTP_SERVERS NTP_MINPOLL" [ -x "/usr/sbin/llxcfg-showvars" ] && eval `/usr/sbin/llxcfg-showvars ${VAR_LIST}` if which ntpd &>/dev/null ; then gen_conf |skel-install "$NTP_FILE" fi exit 0