aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAin <41307858+nero@users.noreply.github.com>2018-09-24 19:14:52 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2018-09-27 15:55:31 +0000
commitd57d6aa9e65fc2db98bd4ee83eb8ca40ffa7a481 (patch)
tree1eb7479c394dcfb2a358ff010a7da88eb6323e7f
parentc864961f99d1dbf18bab3475e5371c9eb7e6c1f3 (diff)
downloadaports-d57d6aa9e65fc2db98bd4ee83eb8ca40ffa7a481.tar.gz
aports-d57d6aa9e65fc2db98bd4ee83eb8ca40ffa7a481.tar.bz2
aports-d57d6aa9e65fc2db98bd4ee83eb8ca40ffa7a481.tar.xz
main/ppp: add openrc service
-rw-r--r--main/ppp/APKBUILD25
-rwxr-xr-xmain/ppp/pppd.initd13
2 files changed, 20 insertions, 18 deletions
diff --git a/main/ppp/APKBUILD b/main/ppp/APKBUILD
index feccc75260..a51e463a73 100644
--- a/main/ppp/APKBUILD
+++ b/main/ppp/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=ppp
pkgver=2.4.7
-pkgrel=5
+pkgrel=6
pkgdesc="A daemon which implements the PPP protocol for dial-up networking"
url="http://www.samba.org/ppp/"
arch="all"
@@ -10,7 +10,7 @@ makedepends="bsd-compat-headers linux-headers"
subpackages="$pkgname-doc $pkgname-dev $pkgname-chat $pkgname-radius
$pkgname-atm $pkgname-pppoe $pkgname-l2tp $pkgname-winbind
$pkgname-passprompt $pkgname-passwordfd $pkgname-minconn
- $pkgname-daemon
+ $pkgname-openrc $pkgname-daemon
"
# for compatibility reasons the 'ppp' package is an empty meta package
@@ -27,7 +27,8 @@ source="https://ftp.samba.org/pub/ppp/ppp-$pkgver.tar.gz
fix-paths.patch
0011-build-sys-don-t-put-connect-errors-log-to-etc-ppp.patch
ip-down
- ip-up"
+ ip-up
+ pppd.initd"
_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
@@ -73,6 +74,7 @@ package() {
"$pkgdir"/usr/include/net/ppp_defs.h || return 1
install -D -m755 "$srcdir"/ip-up "$pkgdir"/etc/ppp/ip-up
install -D -m755 "$srcdir"/ip-down "$pkgdir"/etc/ppp/ip-down
+ install -D -m755 "$srcdir"/pppd.initd "$pkgdir"/etc/init.d/pppd
install -D -m644 etc.ppp/options "$pkgdir"/etc/ppp/options
install -D -m600 etc.ppp/pap-secrets "$pkgdir"/etc/ppp/pap-secrets
install -D -m600 etc.ppp/chap-secrets "$pkgdir"/etc/ppp/chap-secrets
@@ -170,24 +172,11 @@ daemon() {
mv "$pkgdir"/* "$subpkgdir"/ || return 1
}
-md5sums="78818f40e6d33a1d1de68a1551f6595a ppp-2.4.7.tar.gz
-5a5c2d1bdca62979d9ed7a5a648e86d1 defaultroute-metric.3.patch
-8d2128c74d62a2844491a24794b05a3e musl-fix-headers.patch
-c8f78e010a776d114d687b1a742ca6bb fix-paths.patch
-995535911b0bc5390cd75cee1eae690b 0011-build-sys-don-t-put-connect-errors-log-to-etc-ppp.patch
-a88b40b1bf91eb5cca3762b7195e4fe2 ip-down
-fac0c773490371ea673f4be0977a230f ip-up"
-sha256sums="02e0a3dd3e4799e33103f70ec7df75348c8540966ee7c948e4ed8a42bbccfb30 ppp-2.4.7.tar.gz
-1f69c03747ed68eaaaa8b2f0a239e57f167967fc90a6f89d802dcfe77026846f defaultroute-metric.3.patch
-b136d5366e64a686a3ea24baaaeb4a37c2654c098dd7fcb263caebf9e9281956 musl-fix-headers.patch
-b6453eeb32a78d6748b3fc5ef9f21a7862f70f8316c3903097ad63f00497266b fix-paths.patch
-369bcf35e6746e32144357177c8e6650caf7b17018836889ade1019f80715bf3 0011-build-sys-don-t-put-connect-errors-log-to-etc-ppp.patch
-84f2b44c9f4b8abdbc9cfbfffb669fa19385b80da55f9c292df115189dc62bd6 ip-down
-7d44e21ed945434c32a385f44c690826f74c3d5ddac353deae8174692d8d1beb ip-up"
sha512sums="e34ce24020af6a73e7a26c83c4f73a9c83fa455b7b363794dba27bf01f70368be06bff779777843949bd77f4bc9385d6ad455ea48bf8fff4e0d73cc8fef16ae2 ppp-2.4.7.tar.gz
fccc7a6809ae4a617796ccf1d2132de8edb1cc0c71d76a95393585a5970b92be2a54da558702db355c8aea8d37b4dfffc64406129a2b3322f0b10e8f0481f685 defaultroute-metric.3.patch
2f071ea9db15e4abf1bed6cce8130dc81b710a31bfef5fa8f9370c353f845dbc47674b1551b8e040478e5156add6f98d480530206125e8bb308f0f4288d1eec6 musl-fix-headers.patch
8384afb992a98a7f97b484866e6aa1b1de51e901d7837f84f7ce2beba6815591450fab43957f03b65804424c4940c59640a9cd878979240a171aa77427e9c4ff fix-paths.patch
b490971d03fef4de66b61123f80a0087270bcb88466ae8ed98ea9a08b35d4c7c46b2dadd304e2970a4206bb5760a14370d7e3873de6240119d88e927ecef840c 0011-build-sys-don-t-put-connect-errors-log-to-etc-ppp.patch
160260bd2a788beaac395eadb38efbfd1e0e1a458fe151555acacf2c4f3a12381d644672c664f9793db6e3459a4f05a54e3ff6d407b0d37e8014b15bd0f11bcc ip-down
-8258c95a6b6e8e94d6001b5cd3a99bd3270f29ba0f2e5050a26c8d5f1b67eead8d039e71ce86a784d45e620047b0a2bb14b258d80a9ea62084ba588a4c2e2d84 ip-up"
+8258c95a6b6e8e94d6001b5cd3a99bd3270f29ba0f2e5050a26c8d5f1b67eead8d039e71ce86a784d45e620047b0a2bb14b258d80a9ea62084ba588a4c2e2d84 ip-up
+bd6f43588b037367ffdb57f5e331492dcaa5969003e219c2dc8b90e6be1aa407282ff6114b91d1379ebeff766983fa0622456520cc0ac592b4f0b1496acf21bf pppd.initd"
diff --git a/main/ppp/pppd.initd b/main/ppp/pppd.initd
new file mode 100755
index 0000000000..30bd641da1
--- /dev/null
+++ b/main/ppp/pppd.initd
@@ -0,0 +1,13 @@
+#!/sbin/openrc-run
+
+name="pppd"
+command="/usr/sbin/${SVCNAME}"
+command_args="nodetach ${PPPD_OPTS}"
+pidfile="/var/run/$SVCNAME.pid"
+command_background=true
+
+start_pre() {
+ checkpath --directory /var/run/ppp
+ modprobe pptp
+}
+