aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2022-07-05 16:37:19 +0200
committerJakub Jirutka <jakub@jirutka.cz>2022-07-05 16:49:06 +0200
commit453c59149c417086286e53defdfb0671589dbe7d (patch)
tree894a48a8e8320e96952cf88f181e6b378c7aea53
parent77316141ddf008f743b35f74e9de61e4f9ad8a87 (diff)
downloadaports-453c59149c417086286e53defdfb0671589dbe7d.tar.gz
aports-453c59149c417086286e53defdfb0671589dbe7d.tar.bz2
aports-453c59149c417086286e53defdfb0671589dbe7d.tar.xz
community/at: don't overwrite /var/spool/atd/.SEQ on upgrade
-rw-r--r--community/at/APKBUILD5
-rw-r--r--community/at/at.post-install7
2 files changed, 11 insertions, 1 deletions
diff --git a/community/at/APKBUILD b/community/at/APKBUILD
index dc4a43d29b..640adb1934 100644
--- a/community/at/APKBUILD
+++ b/community/at/APKBUILD
@@ -10,7 +10,7 @@ arch="all"
options="!check suid" # No test suite.
license="GPL-2.0-or-later"
makedepends="ssmtp flex-dev byacc"
-install="$pkgname.pre-install"
+install="$pkgname.pre-install $pkgname.post-install"
subpackages="$pkgname-doc $pkgname-openrc"
source="http://software.calhariz.com/at/at_$pkgver.orig.tar.gz
0001-opt_V.patch
@@ -51,6 +51,9 @@ package() {
make IROOT="$pkgdir" install
+ # This file is created by post-install script, if not exist yet.
+ rm "$pkgdir"/var/spool/atd/.SEQ
+
install -m 755 -D "$srcdir"/atd.initd "$pkgdir"/etc/init.d/atd
install -m 644 -D "$srcdir"/atd.confd "$pkgdir"/etc/conf.d/atd
}
diff --git a/community/at/at.post-install b/community/at/at.post-install
new file mode 100644
index 0000000000..ebc6615ddd
--- /dev/null
+++ b/community/at/at.post-install
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+if ! [ -f /var/spool/atd/.SEQ ]; then
+ install -m 600 -o at -g at /dev/null /var/spool/atd/.SEQ
+fi
+
+exit 0