wok-tiny annotate ntp-config/receipt @ rev 153
No hard coded boot menu
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Sep 20 21:15:35 2019 +0200 (2019-09-20) |
parents | 0d8ef9102fc0 |
children | a28c45a86936 |
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@149 | 10 AUTO_SELECTION="CONFIG_NTPD" |
pascal@5 | 11 DEPENDS="base-tiny" |
pascal@5 | 12 CONFIG_FILES="/etc/daemons.conf /etc/rcS.conf" |
pascal@5 | 13 |
pascal@5 | 14 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@5 | 15 genpkg_rules() |
pascal@5 | 16 { |
pascal@5 | 17 mkdir -p $fs/etc |
pascal@5 | 18 } |
pascal@5 | 19 |
pascal@5 | 20 post_install() |
pascal@5 | 21 { |
pascal@5 | 22 grep -q ntpd $1/etc/rcS.conf || |
pascal@5 | 23 sed -i 's/^RUN_DAEMONS="/&ntpd /' $1/etc/rcS.conf |
pascal@5 | 24 grep -q NTPD_OPTIONS $1/etc/daemons.conf || |
pascal@5 | 25 cat >> $1/etc/daemons.conf <<EOT |
pascal@5 | 26 |
pascal@5 | 27 # Ntp daemon options. |
pascal@5 | 28 NTPD_OPTIONS="-l -p $NTP_SERVER" |
pascal@5 | 29 EOT |
pascal@5 | 30 } |
pascal@5 | 31 |
pascal@5 | 32 config_form() |
pascal@5 | 33 { |
pascal@5 | 34 [ -n "$NTP_SERVER" ] || NTP_SERVER=fr.pool.ntp.org |
pascal@5 | 35 cat <<EOT |
pascal@5 | 36 <table> |
pascal@5 | 37 <tr> |
pascal@5 | 38 <td>NTP server</td> |
pascal@5 | 39 <td><input type="text" name="NTP_SERVER" value="$NTP_SERVER" /></td> |
pascal@5 | 40 </tr> |
pascal@5 | 41 </table> |
pascal@5 | 42 EOT |
pascal@5 | 43 } |