wok-tiny view ntp-config/receipt @ rev 35

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