treewide: fix service status command in procd compatible services
authorPetr Štetiar <ynezz@true.cz>
Sat, 21 Sep 2019 08:53:48 +0000 (10:53 +0200)
committerPetr Štetiar <ynezz@true.cz>
Mon, 18 Nov 2019 05:28:57 +0000 (06:28 +0100)
Fix breaking change introduced in the main tree with a commit
7519a36774ca ("base-files,procd: add generic service status") where the
old service `status` callback function doesn't work anymore and needs to
be renamed to `status_service`.  This name was chosen for consistency
with start and stop function callbacks, which are using `start_service`
and `stop_service` naming schemes.

While at it, fix whitespace issues in the status_service as well.

Ref: http://lists.infradead.org/pipermail/openwrt-devel/2019-September/019035.html
Reported-by: Dirk Brenken <dev@brenken.org>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
libs/postgresql/Makefile
libs/postgresql/files/postgresql.init
net/apfree-wifidog/Makefile
net/apfree-wifidog/files/wifidogx.init
net/simple-adblock/Makefile
net/simple-adblock/files/simple-adblock.init
net/wifidog/Makefile
net/wifidog/files/wifidog.init

index 810f59c5504849b644c829f245e2ef9ac2649004..6f57e8f8bac8383403eb904dade55bb7a40098b2 100644 (file)
@@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=postgresql
 PKG_VERSION:=11.3
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
 PKG_LICENSE:=PostgreSQL
 PKG_CPE_ID:=cpe:/a:postgresql:postgresql
index 959f3271c26d9bf4dea6b28d87fbfbaba5e6db33..3d3dbadf47ab36e998ba888f61f63d727da3960e 100644 (file)
@@ -6,9 +6,6 @@ PROG=/usr/bin/postmaster
 
 USE_PROCD=1
 
-EXTRA_COMMANDS="status"
-EXTRA_HELP="        status  Show current status of the PostgreSQL server"
-
 fix_hosts() {
        # make sure localhost (without a dot) is in /etc/hosts
        grep -q 'localhost$' /etc/hosts || echo '127.0.0.1 localhost' >> /etc/hosts
@@ -71,7 +68,7 @@ stop_service() {
        /usr/bin/pg_ctl stop -U postgres -D "${pgdata}" -s
 }
 
-status() {
+status_service() {
        config_load "postgresql"
        config_get pgdata config PGDATA
        /usr/bin/pg_ctl status -U postgres -D "${pgdata}"
index bea59df31579b88031b50cf2b99fff30d98b81a8..7778bdfef453b0098274fd075907ee994e54f2fc 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=apfree-wifidog
 PKG_VERSION:=3.11.1716
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/liudf0716/apfree_wifidog.git
index be87af5b99d014207b807bbffe12e79af84e9b3a..b537c0ce8ad8b744461be53fed0fda3a04595106 100644 (file)
@@ -280,6 +280,6 @@ start_service() {
        procd_close_instance
 }
 
-status() {
+status_service() {
        /usr/bin/wdctlx status
 }
index bfda56c870e91ceecaa56b5308419145ef36006a..e15edd9c325c4abaa5278ce7959ea4bfbfa322c3 100644 (file)
@@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=simple-adblock
 PKG_VERSION:=1.8.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_MAINTAINER:=Stan Grishin <stangri@melmac.net>
 PKG_LICENSE:=GPL-3.0-or-later
 
index 6550ff9cc12c9c47a3d72f5b6bdc02832052d7b3..7272af73704bdebaa36cac1db36404f4f7f73ee7 100644 (file)
@@ -1028,9 +1028,9 @@ killcache() {
        return 0
 }
 
-status() {
+status_service() {
        local status="$(tmpfs get status)" error="$(tmpfs get error)" message="$(tmpfs get message)"
-       if [ -n "$status" ] && [ -n "$message" ]; then 
+       if [ -n "$status" ] && [ -n "$message" ]; then
                status="${status}: $message"
        fi
        [ -n "$status" ] && output "$serviceName $status\\n"
index 03e78a38fcb5369c863489035abbc5a08c93fcfc..47367e4744cde0adfb25cee93dd88a8978c6019f 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=wifidog
 PKG_VERSION:=1.3.0
-PKG_RELEASE:=4
+PKG_RELEASE:=5
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/wifidog/wifidog-gateway
index 6ebf64fbcb1c219baccdc7b1bee8c7ce4ff7a9ef..3078a001a656bbff5bf24d3a43975e6d40bd15ce 100644 (file)
@@ -17,6 +17,6 @@ start_service() {
     procd_close_instance
 }
 
-status() {
+status_service() {
     /usr/bin/wdctl status
 }