Subject: [alpine-aports] [PATCH] testing/inetutils-syslogd: update to 1.9.4 + fix scripts

From: Stuart Cardall <[email-masked]>
Date: Wed, 29 Jul 2015 17:09:45 +0000

---
 testing/inetutils-syslogd/APKBUILD                 | 37 +++++++++-------------
 testing/inetutils-syslogd/inetutils-syslogd.initd  | 36 +++++++--------------
 .../inetutils-syslogd.post-deinstall               | 10 +++---
 .../inetutils-syslogd.post-install                 |  3 ++
 testing/inetutils-syslogd/inetutils-syslogd.setup  |  2 +-
 5 files changed, 35 insertions(+), 53 deletions(-)
 create mode 100644 testing/inetutils-syslogd/inetutils-syslogd.post-install

diff --git a/testing/inetutils-syslogd/APKBUILD b/testing/inetutils-syslogd/APKBUILD
index 1e09e31..cfe6fdd 100644
--- a/testing/inetutils-syslogd/APKBUILD
+++ b/testing/inetutils-syslogd/APKBUILD
@@ -2,16 +2,15 @@
 # Maintainer: Stuart Cardall <[email-masked]>
 pkgname=inetutils-syslogd
 _pkgname=inetutils
-pkgver=1.9.2
-pkgrel=1
+pkgver=1.9.4
+pkgrel=0
 pkgdesc="A small syslogd for logging to multiple files"
 url="http://www.gnu.org/software/inetutils/"
 arch="all"
 license="GPL3"
-depends=""
-depends_dev=""
-makedepends="$depends_dev readline-dev ncurses-dev"
-install="$pkgname.post-deinstall"
+depends_dev="readline-dev ncurses-dev"
+makedepends="$depends_dev"
+install="$pkgname.post-install $pkgname.post-deinstall"
 subpackages="$pkgname-doc"
 source="http://ftp.gnu.org/gnu/inetutils/${_pkgname}-${pkgver}.tar.gz
 	$pkgname.initd
@@ -46,7 +45,7 @@ build() {
 		--disable-tftp --disable-tftpd \
 		--disable-ping --disable-ping6 \
 		--disable-logger --enable-syslogd \
-		--disable-inetd --disable-whois \
+		--disable-inetd --disable-whois --disable-dnsdomainname \
 		--disable-uucpd --disable-ifconfig --disable-traceroute \
 		|| return 1
         make || return 1
@@ -77,29 +76,23 @@ package() {
 	install -m755 -D "$srcdir"/inetutils-syslogd.setup \
                 "$pkgdir"/sbin/setup-inetutils-syslogd || return 1
 	mkdir -p "$pkgdir/usr/share/apk-tools/$pkgname"
-	# post-install message
-        mkdir -p "$pkgdir/usr/share/doc/$pkgname"
-        cat > $pkgdir/usr/share/doc/$pkgname/README.alpine <<EOF
-To configure inetutils-syslogd / BusyBox Syslog Services & Runlevels execute:
-/sbin/setup-inetutils-syslogd
-EOF
 }
 
-md5sums="aa1a9a132259db83e66c1f3265065ba2  inetutils-1.9.2.tar.gz
-2d10e729ebbd62a42f5416957507a834  inetutils-syslogd.initd
+md5sums="04852c26c47cc8c6b825f2b74f191f52  inetutils-1.9.4.tar.gz
+4a5ed84baf026fe2e686b9e915d140e3  inetutils-syslogd.initd
 edf3f502d9f2bf49c5da8cb37a927d06  inetutils-syslogd.confd
 9c9998ff341c48322ffdc8f48fa018cf  syslog.conf
 842e971153c19cb328db2cc6e22a7baf  inetutils-syslogd.logrotate
-751bda34989e3a7baff0621a3450cea3  inetutils-syslogd.setup"
-sha256sums="0423ea40a160cd4630f817e247df5c08ecc625378d2bb56a0509117a36a89913  inetutils-1.9.2.tar.gz
-a10aee16af111e1dbd0d67818dc590357de321ba6aa7acde6068c0bbea1cad9f  inetutils-syslogd.initd
+82d3bf51747654410b2dbd4075e940b4  inetutils-syslogd.setup"
+sha256sums="be8f75eff936b8e41b112462db51adf689715658a1b09e0d6b05d11ec92cc616  inetutils-1.9.4.tar.gz
+a0bc678a83103ee412c6c57a5f5e0bc4c66f579f7e839f71aac99d329719c80f  inetutils-syslogd.initd
 86105f0a0105f50275f7381b5d7fe603b8d854a0e6753c2f06f6d0c234562948  inetutils-syslogd.confd
 0b3f080466437a068d1627a00a5abdf494fdefa2e17821b993462d0310e60cc3  syslog.conf
 f2afe7dad8cd933fbd213b20f09127096f8798698874b2ead2d47a6509f95f6c  inetutils-syslogd.logrotate
-7747b585eddc9f7bd7cff0d23d785ba7efdbbb4f67781b23279f881272a4d559  inetutils-syslogd.setup"
-sha512sums="5584219aba4c4fc035776adf88f0e3e7f5553d35b0142b8633aa21f135b31df1545e40d5ea54ec90dbcc8410dbc9924fb845f8e28daba0d783630a9201e63cbf  inetutils-1.9.2.tar.gz
-6ab6957da26b7365b7fcf2d7fd4a65053e38ffd981f106a48f010f93a9a12b7be52d0789631b263247b32d68d57d25247e0ef8fa811e57967db64c0d9049891e  inetutils-syslogd.initd
+f293c6221c89f6d3eb4a557fe68ca66cc92696c95b48182821aa5aa61f9a2c8f  inetutils-syslogd.setup"
+sha512sums="8074eb230c64d8fb0f3a20825b9329e5648b81941bb3441c5ffe2661c428f93fe2bac222d5334e75ef182083124c4bc5d7ebf8090ed667e4ae33b9aaacbc6dcb  inetutils-1.9.4.tar.gz
+75d5681d08a391956e0f0510eadb20c3ba74de4026f76ea0a54c3e34bb53655ff6cbe3087c0953343fdef3b05864a4dc7d9d12ed26836f8986859868f0076c79  inetutils-syslogd.initd
 82968692b4fe79706aacaeb1021b343288dc4f1d86925481796dac1f743a8269976ce86bf446cd0c16d246b918e5822e312660b201407eb7031a17cb398c9513  inetutils-syslogd.confd
 d9c61aee1a3f2c7cf7b06dfda08599c08f1f618ba092e60adff11e9cbe5be847544780eaa9e4bb54a70c5e5bc243fed3d6ff8111878f073b41629db4245b135c  syslog.conf
 ffe2b1fd6b9d4dc9e378f0c857be318ec86e48aee17ede865656bdf9a5da3d2f3a8ffe788cd62794132839577ab6ce1ce7fe3a964bc21e0f8b698827a9ee5817  inetutils-syslogd.logrotate
-89ee7b84b79575140d38cb08bde1238366aad53977408ddf9f659922618a1716ad8e6367b6ca9712178ac9e9d26639dffca8f5ea1e46bda5c571029e80bc42ee  inetutils-syslogd.setup"
+a3c54be2c2154adec3b5d8cf68e43f274eb42ac2e02f3ea39235a11f333d1cc88ea2d0af93daf5095c8de7dfbbc147c53d97bbfce3944f50858ee97907270bf7  inetutils-syslogd.setup"
diff --git a/testing/inetutils-syslogd/inetutils-syslogd.initd b/testing/inetutils-syslogd/inetutils-syslogd.initd
index f8a3dc2..a10caa7 100644
--- a/testing/inetutils-syslogd/inetutils-syslogd.initd
+++ b/testing/inetutils-syslogd/inetutils-syslogd.initd
@@ -1,14 +1,17 @@
 #!/sbin/openrc-run
-
 # This file is part of inetutils-syslogd
-# Created for Alpine Linux by IT Offshore <[email-masked]>
+# Created for Alpine Linux by Stuart Cardall <[email-masked]>
+# Distributed under the terms of the GNU General Public License v2
 
 name=syslogd
-daemon=/usr/sbin/$name
 config_file="/etc/syslog.conf"
+pid_file=/var/run/syslog.pid
+command=/usr/sbin/$name
+command_args=${SYSLOGD_OPTS}
+extra_started_commands="reload"
 
 depend() {
-	need clock hostname localmount
+        need clock hostname localmount
         provide logger
 }
 
@@ -20,31 +23,14 @@ start_pre() {
         check_config || return 1
 }
 
-start() {
-	ebegin "Starting ${name}"
-		start-stop-daemon --start --quiet \
-			--pidfile /var/run/${name}.pid \
-			--exec ${daemon} -- ${SYSLOGD_OPTS}
-	eend $?
-}
-
-stop() {
-	ebegin "Stopping ${name}"
-		start-stop-daemon --stop --quiet \
-			--pidfile /var/run/$name.pid \
-			--exec ${daemon}
-	eend $?
-}
-
 reload() {
-        if [ ! -f "${PIDFILE}" ]; then
-                eerror "rsyslogd not running"
+        if [ ! -f "${pid_file}" ]; then
+                eerror "inetutils-$name is not running"
                 return 1
         fi
 
-        ebegin "Re-opening intetutils-syslogd log files"
-        start-stop-daemon --stop --signal HUP \
-                --pidfile /var/run/$name.pid
+        ebegin "Re-opening intetutils-$name log files"
+        pkill -HUP -f "$command $command_args"
         eend $?
 }
 
diff --git a/testing/inetutils-syslogd/inetutils-syslogd.post-deinstall b/testing/inetutils-syslogd/inetutils-syslogd.post-deinstall
index 28f5dde..009b5b8 100644
--- a/testing/inetutils-syslogd/inetutils-syslogd.post-deinstall
+++ b/testing/inetutils-syslogd/inetutils-syslogd.post-deinstall
@@ -1,7 +1,7 @@
 #!/bin/sh
-rc-update add syslog boot
-# show service status - cron will be stopped due to logger dependency
-echo "Cron:"; rc-service cron status
-echo "Syslog:"; rc-service syslog status
-
+echo; rc-update del inetutils-syslogd boot; rc-update add syslog boot
+syslog_state=$(rc-service syslog status)
+inetutils_state=$(rc-service inetutils-syslogd status)
+echo "$inetutils_state: inetutils-syslogd"
+echo -e "$syslog_state: syslog\n"
 
diff --git a/testing/inetutils-syslogd/inetutils-syslogd.post-install b/testing/inetutils-syslogd/inetutils-syslogd.post-install
new file mode 100644
index 0000000..18099c7
--- /dev/null
+++ b/testing/inetutils-syslogd/inetutils-syslogd.post-install
@@ -0,0 +1,3 @@
+#!/bin/sh
+echo -e "\nTo configure inetutils-syslogd / deconfigure BusyBox syslog execute:\n\n/sbin/setup-inetutils-syslogd\n"
+
diff --git a/testing/inetutils-syslogd/inetutils-syslogd.setup b/testing/inetutils-syslogd/inetutils-syslogd.setup
index fd356df..7c82513 100644
--- a/testing/inetutils-syslogd/inetutils-syslogd.setup
+++ b/testing/inetutils-syslogd/inetutils-syslogd.setup
@@ -17,7 +17,7 @@ print_start() {
 
 print_stop "\nWould you like to STOP BusyBox Syslog & remove it from the Boot Runlevel ?" "[ Enter or Y to remove ]:"; read ans
 if [ -z "$ans" ] || [ "$ans" = "y" ] || [ "$ans" = "Y" ]; then
-        echo; rc-update del syslog boot; rc-service syslog stop
+        echo; rc-update del syslog boot; rc-service syslog stop; rc-service klogd stop
 fi
 
 print_start "\nWould you like to START inetutils-syslogd & add it to the Boot Runlevel ?" "[ Enter or Y to add ]:"; read ans
-- 
2.4.6

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---