wok-tiny annotate ntp-config/receipt @ rev 18
Add tcc
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Feb 02 23:12:23 2011 +0100 (2011-02-02) |
parents | fe7b70cfec97 |
children | d3c5f3688ec0 |
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@9 | 5 CATEGORY="configuration" |
pascal@5 | 6 SHORT_DESC="Network time protocol configuration" |
pascal@5 | 7 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@5 | 8 WEB_SITE="http://mirror.slitaz.org/pizza/tiny/" |
pascal@5 | 9 DEPENDS="base-tiny" |
pascal@5 | 10 CONFIG_FILES="/etc/daemons.conf /etc/rcS.conf" |
pascal@5 | 11 |
pascal@5 | 12 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@5 | 13 genpkg_rules() |
pascal@5 | 14 { |
pascal@5 | 15 mkdir -p $fs/etc |
pascal@5 | 16 } |
pascal@5 | 17 |
pascal@5 | 18 post_install() |
pascal@5 | 19 { |
pascal@5 | 20 grep -q ntpd $1/etc/rcS.conf || |
pascal@5 | 21 sed -i 's/^RUN_DAEMONS="/&ntpd /' $1/etc/rcS.conf |
pascal@5 | 22 grep -q NTPD_OPTIONS $1/etc/daemons.conf || |
pascal@5 | 23 cat >> $1/etc/daemons.conf <<EOT |
pascal@5 | 24 |
pascal@5 | 25 # Ntp daemon options. |
pascal@5 | 26 NTPD_OPTIONS="-l -p $NTP_SERVER" |
pascal@5 | 27 EOT |
pascal@5 | 28 } |
pascal@5 | 29 |
pascal@5 | 30 config_form() |
pascal@5 | 31 { |
pascal@5 | 32 [ -n "$NTP_SERVER" ] || NTP_SERVER=fr.pool.ntp.org |
pascal@5 | 33 cat <<EOT |
pascal@5 | 34 <table> |
pascal@5 | 35 <tr> |
pascal@5 | 36 <td>NTP server</td> |
pascal@5 | 37 <td><input type="text" name="NTP_SERVER" value="$NTP_SERVER" /></td> |
pascal@5 | 38 </tr> |
pascal@5 | 39 </table> |
pascal@5 | 40 EOT |
pascal@5 | 41 } |