aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/openntpd/APKBUILD8
-rw-r--r--main/openntpd/openntpd.post-upgrade7
-rw-r--r--main/openntpd/openntpd.pre-upgrade5
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