diff options
author | Eivind Uggedal <eivind@uggedal.com> | 2014-03-17 12:37:24 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2014-03-17 12:45:25 +0000 |
commit | 9bd55a1a2a59c921b42964c01c5b770fad883249 (patch) | |
tree | 3435f17eff1fea5e41262668fc009cea3032e210 /main/openntpd | |
parent | d249b9785e9bce053b233ff7dbbe6e2f25ba2ff6 (diff) | |
download | aports-9bd55a1a2a59c921b42964c01c5b770fad883249.tar.bz2 aports-9bd55a1a2a59c921b42964c01c5b770fad883249.tar.xz |
main/openntpd: mv {init.d,conf.d}/ntpd -> openntpd
In preparation for ntpd init and conf script in
main/busybox-initscripts.
Handles migration of user edited /etc/conf.d/ntpd
and runlevel enablement.
Diffstat (limited to 'main/openntpd')
-rw-r--r-- | main/openntpd/APKBUILD | 8 | ||||
-rw-r--r-- | main/openntpd/openntpd.post-upgrade | 7 | ||||
-rw-r--r-- | main/openntpd/openntpd.pre-upgrade | 5 |
3 files changed, 16 insertions, 4 deletions
diff --git a/main/openntpd/APKBUILD b/main/openntpd/APKBUILD index 0b88c56608..2f1675ba3e 100644 --- a/main/openntpd/APKBUILD +++ b/main/openntpd/APKBUILD @@ -2,10 +2,10 @@ pkgname=openntpd pkgver=3.9_p1 _myver=3.9p1 -pkgrel=10 +pkgrel=11 pkgdesc="Lightweight NTP server ported from OpenBSD" url=http://www.openntpd.org/ -install=openntpd.pre-install +install="$pkgname.pre-install $pkgname.pre-upgrade $pkgname.post-upgrade" subpackages="openntpd-doc" depends= @@ -41,8 +41,8 @@ build() { package() { cd "$srcdir/$pkgname-$_myver" make install DESTDIR="$pkgdir" - install -Dm755 ../openntpd.initd "$pkgdir/etc/init.d/ntpd" - install -Dm644 ../openntpd.confd "$pkgdir/etc/conf.d/ntpd" + install -Dm755 ../openntpd.initd "$pkgdir/etc/init.d/$pkgname" + install -Dm644 ../openntpd.confd "$pkgdir/etc/conf.d/$pkgname" } md5sums="afc34175f38d08867c1403d9008600b3 openntpd-3.9p1.tar.gz diff --git a/main/openntpd/openntpd.post-upgrade b/main/openntpd/openntpd.post-upgrade new file mode 100644 index 0000000000..88f0fa97e2 --- /dev/null +++ b/main/openntpd/openntpd.post-upgrade @@ -0,0 +1,7 @@ +#!/bin/sh + +for i in /run/openrc/started/ntpd /etc/runlevels/*/ntpd; do + if [ -L "$i" ]; then + mv "$i" "${i%/*}"/openntpd + fi +done diff --git a/main/openntpd/openntpd.pre-upgrade b/main/openntpd/openntpd.pre-upgrade new file mode 100644 index 0000000000..3b052db3ff --- /dev/null +++ b/main/openntpd/openntpd.pre-upgrade @@ -0,0 +1,5 @@ +#!/bin/sh + +if grep -q '^NTPD_HOME=' /etc/conf.d/ntpd 2>/dev/null; then + mv /etc/conf.d/ntpd /etc/conf.d/openntpd +fi |