wok-tiny annotate ntp-config/receipt @ rev 131

base-tiny: typo
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Aug 20 09:49:39 2017 +0200 (2017-08-20)
parents 371673f39e46
children e37956962a84
rev   line source
pascal@5 1 # SliTaz package receipt.
pascal@5 2
pascal@5 3 PACKAGE="ntp-config"
pascal@5 4 VERSION="1.0"
pascal@109 5 CATEGORY="network"
pascal@5 6 SHORT_DESC="Network time protocol configuration"
pascal@5 7 MAINTAINER="pascal.bellard@slitaz.org"
pascal@90 8 LICENSE="BSD"
pascal@55 9 WEB_SITE="http://tiny.slitaz.org/"
pascal@5 10 DEPENDS="base-tiny"
pascal@5 11 CONFIG_FILES="/etc/daemons.conf /etc/rcS.conf"
pascal@5 12
pascal@5 13 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@5 14 genpkg_rules()
pascal@5 15 {
pascal@5 16 mkdir -p $fs/etc
pascal@5 17 }
pascal@5 18
pascal@5 19 post_install()
pascal@5 20 {
pascal@5 21 grep -q ntpd $1/etc/rcS.conf ||
pascal@5 22 sed -i 's/^RUN_DAEMONS="/&ntpd /' $1/etc/rcS.conf
pascal@5 23 grep -q NTPD_OPTIONS $1/etc/daemons.conf ||
pascal@5 24 cat >> $1/etc/daemons.conf <<EOT
pascal@5 25
pascal@5 26 # Ntp daemon options.
pascal@5 27 NTPD_OPTIONS="-l -p $NTP_SERVER"
pascal@5 28 EOT
pascal@5 29 }
pascal@5 30
pascal@5 31 config_form()
pascal@5 32 {
pascal@5 33 [ -n "$NTP_SERVER" ] || NTP_SERVER=fr.pool.ntp.org
pascal@5 34 cat <<EOT
pascal@5 35 <table>
pascal@5 36 <tr>
pascal@5 37 <td>NTP server</td>
pascal@5 38 <td><input type="text" name="NTP_SERVER" value="$NTP_SERVER" /></td>
pascal@5 39 </tr>
pascal@5 40 </table>
pascal@5 41 EOT
pascal@5 42 }