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

linux: fix bundle.S
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Sep 26 17:09:38 2023 +0000 (7 months ago)
parents a28c45a86936
children
line source
1 # SliTaz package receipt.
3 PACKAGE="ntp-config"
4 VERSION="1.0"
5 CATEGORY="network"
6 GROUP="network"
7 SHORT_DESC="Network time protocol configuration"
8 MAINTAINER="pascal.bellard@slitaz.org"
9 LICENSE="BSD"
10 WEB_SITE="http://tiny.slitaz.org/"
11 AUTO_SELECTION="CONFIG_NTPD"
12 DEPENDS="base-tiny busybox-net"
13 CONFIG_FILES="/etc/daemons.conf /etc/rcS.conf"
15 # Rules to gen a SliTaz package suitable for Tazpkg.
16 genpkg_rules()
17 {
18 mkdir -p $fs/etc
19 }
21 post_install()
22 {
23 grep -q ntpd $1/etc/rcS.conf ||
24 sed -i 's/^RUN_DAEMONS="/&ntpd /' $1/etc/rcS.conf
25 grep -q NTPD_OPTIONS $1/etc/daemons.conf ||
26 cat >> $1/etc/daemons.conf <<EOT
28 # Ntp daemon options.
29 NTPD_OPTIONS="-l -p $NTP_SERVER"
30 EOT
31 }
33 config_form()
34 {
35 [ -n "$NTP_SERVER" ] || NTP_SERVER=fr.pool.ntp.org
36 cat <<EOT
37 <table>
38 <tr>
39 <td>NTP server</td>
40 <td><input type="text" name="NTP_SERVER" value="$NTP_SERVER" /></td>
41 </tr>
42 </table>
43 EOT
44 }