Skip to contentSkip to conversation

ypbind-mt: add status command for initscript

PATCH In review [email protected] 1 participant 4 messages Aug 13, 2015 – Sep 6, 2015

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ypbind-mt: add status command for initscript

From: Zhu Yanjun <[email protected]>

Add the "status" command in initscript to check the status of ypbind. remove ypbind-yocto.init as ypbind.init, which is the initscript, make its name similar to other recipes

---
 .../recipes-support/nis/files/{ypbind-yocto.init => ypbind.init}   | 7 +++++++
 meta-networking/recipes-support/nis/ypbind-mt_1.38.bb              | 4 ++--
 meta-networking/recipes-support/nis/ypbind-mt_2.2.bb               | 4 ++--
 3 files changed, 11 insertions(+), 4 deletions(-)
 rename meta-networking/recipes-support/nis/files/{ypbind-yocto.init => ypbind.init} (96%)
meta-networking/recipes-support/nis/files/ypbind.init renamed from meta-networking/recipes-support/nis/files/ypbind-yocto.init +7 -0
similarity index 96%
rename from meta-networking/recipes-support/nis/files/ypbind-yocto.init
rename to meta-networking/recipes-support/nis/files/ypbind.init
index 2c50d12..244dc78 100644
@@ -21,6 +21,9 @@
 #	the NIS binding information.
 ### END INIT INFO
 
+# Need to use status function
+. /etc/init.d/functions
+
 YPBIND_BIN=/usr/sbin/ypbind
 pidfile=/var/run/ypbind.pid
 
@@ -92,6 +95,10 @@ case "$1" in
 	echo -n "Reload service ypbind"
 	start-stop-daemon --stop --quiet --signal 1 --pidfile $pidfile
 	;;
+    status)
+	echo -n "Checking for ypbind: "
+	status $YPBIND_BIN
+	;;
     *)
 	echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}"
 	exit 1
meta-networking/recipes-support/nis/ypbind-mt_1.38.bb +2 -2
index d25ef5c..5702cd6 100644
@@ -26,7 +26,7 @@ DEPENDS = " \
 PROVIDES += "ypbind"
 
 SRC_URI = "http://www.linux-nis.org/download/ypbind-mt/${BP}.tar.bz2 \
-           file://ypbind-yocto.init \
+           file://ypbind.init \
            file://ypbind.service \
 "
 SRC_URI[md5sum] = "094088c0e282fa7f3b3dd6cc51d0a4e1"
@@ -44,7 +44,7 @@ do_install_append () {
     install -d ${D}${sysconfdir}/init.d
     install -d ${D}${sysconfdir}/rcS.d
 
-    install -m 0755 ${WORKDIR}/ypbind-yocto.init ${D}${sysconfdir}/init.d/ypbind
+    install -m 0755 ${WORKDIR}/ypbind.init ${D}${sysconfdir}/init.d/ypbind
 
     install -d ${D}${systemd_unitdir}/system
     install -m 0644 ${WORKDIR}/ypbind.service ${D}${systemd_unitdir}/system
meta-networking/recipes-support/nis/ypbind-mt_2.2.bb +2 -2
index 6a9262a..cee5880 100644
@@ -21,7 +21,7 @@ PROVIDES += "ypbind"
 PNBLACKLIST[ypbind-mt] ?= "BROKEN: Depends on broken yp-tools"
 
 SRC_URI = "http://www.linux-nis.org/download/ypbind-mt/${BP}.tar.bz2 \
-           file://ypbind-yocto.init \
+           file://ypbind.init \
            file://ypbind.service \
 "
 SRC_URI[md5sum] = "54e2040d8266ae7d302d081ca310c8a8"
@@ -41,7 +41,7 @@ do_install_append () {
     install -d ${D}${sysconfdir}/init.d
     install -d ${D}${sysconfdir}/rcS.d
 
-    install -m 0755 ${WORKDIR}/ypbind-yocto.init ${D}${sysconfdir}/init.d/ypbind
+    install -m 0755 ${WORKDIR}/ypbind.init ${D}${sysconfdir}/init.d/ypbind
 
     install -d ${D}${systemd_unitdir}/system
     install -m 0644 ${WORKDIR}/ypbind.service ${D}${systemd_unitdir}/system
Signature · 1 line
2.1.4
#1 lore raw

Could we drop the first version of this patch from master-next, {[a314ab41a] ypbind-yocto.init: add status command}

and accept this one

thanks

-Roy

Quoted 88 lines · On 2015年08月13日 08:38, [email protected] wrote:

From: Zhu Yanjun <[email protected]>

Add the "status" command in initscript to check the status of ypbind. remove ypbind-yocto.init as ypbind.init, which is the initscript, make its name similar to other recipes

---
  .../recipes-support/nis/files/{ypbind-yocto.init => ypbind.init}   | 7 +++++++
  meta-networking/recipes-support/nis/ypbind-mt_1.38.bb              | 4 ++--
  meta-networking/recipes-support/nis/ypbind-mt_2.2.bb               | 4 ++--
  3 files changed, 11 insertions(+), 4 deletions(-)

rename meta-networking/recipes-support/nis/files/{ypbind-yocto.init => ypbind.init} (96%)

meta-networking/recipes-support/nis/files/ypbind.init renamed from meta-networking/recipes-support/nis/files/ypbind-yocto.init +7 -0
similarity index 96%
rename from meta-networking/recipes-support/nis/files/ypbind-yocto.init
rename to meta-networking/recipes-support/nis/files/ypbind.init
index 2c50d12..244dc78 100644
@@ -21,6 +21,9 @@
  #	the NIS binding information.
  ### END INIT INFO
 
+# Need to use status function
+. /etc/init.d/functions
+
  YPBIND_BIN=/usr/sbin/ypbind
  pidfile=/var/run/ypbind.pid
 
@@ -92,6 +95,10 @@ case "$1" in
  	echo -n "Reload service ypbind"
  	start-stop-daemon --stop --quiet --signal 1 --pidfile $pidfile
  	;;
+    status)
+	echo -n "Checking for ypbind: "
+	status $YPBIND_BIN
+	;;
      *)
  	echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}"
  	exit 1
meta-networking/recipes-support/nis/ypbind-mt_1.38.bb +2 -2
index d25ef5c..5702cd6 100644
@@ -26,7 +26,7 @@ DEPENDS = " \
  PROVIDES += "ypbind"
 
  SRC_URI = "http://www.linux-nis.org/download/ypbind-mt/${BP}.tar.bz2 \
-           file://ypbind-yocto.init \
+           file://ypbind.init \
             file://ypbind.service \
  "
  SRC_URI[md5sum] = "094088c0e282fa7f3b3dd6cc51d0a4e1"
@@ -44,7 +44,7 @@ do_install_append () {
      install -d ${D}${sysconfdir}/init.d
      install -d ${D}${sysconfdir}/rcS.d
 
-    install -m 0755 ${WORKDIR}/ypbind-yocto.init ${D}${sysconfdir}/init.d/ypbind
+    install -m 0755 ${WORKDIR}/ypbind.init ${D}${sysconfdir}/init.d/ypbind
 
      install -d ${D}${systemd_unitdir}/system
      install -m 0644 ${WORKDIR}/ypbind.service ${D}${systemd_unitdir}/system
meta-networking/recipes-support/nis/ypbind-mt_2.2.bb +2 -2
index 6a9262a..cee5880 100644
@@ -21,7 +21,7 @@ PROVIDES += "ypbind"
  PNBLACKLIST[ypbind-mt] ?= "BROKEN: Depends on broken yp-tools"
 
  SRC_URI = "http://www.linux-nis.org/download/ypbind-mt/${BP}.tar.bz2 \
-           file://ypbind-yocto.init \
+           file://ypbind.init \
             file://ypbind.service \
  "
  SRC_URI[md5sum] = "54e2040d8266ae7d302d081ca310c8a8"
@@ -41,7 +41,7 @@ do_install_append () {
      install -d ${D}${sysconfdir}/init.d
      install -d ${D}${sysconfdir}/rcS.d
 
-    install -m 0755 ${WORKDIR}/ypbind-yocto.init ${D}${sysconfdir}/init.d/ypbind
+    install -m 0755 ${WORKDIR}/ypbind.init ${D}${sysconfdir}/init.d/ypbind
 
      install -d ${D}${systemd_unitdir}/system
      install -m 0644 ${WORKDIR}/ypbind.service ${D}${systemd_unitdir}/system
Signature · 2 lines
Best Reagrds,
Roy | RongQing Li
#2 lore raw

ping

-Roy

Quoted 115 lines · Rongqing Li

Could we drop the first version of this patch from master-next, {[a314ab41a] ypbind-yocto.init: add status command}

and accept this one

thanks

-Roy

Quoted 103 lines · On 2015年08月13日 08:38, [email protected] wrote:

From: Zhu Yanjun <[email protected]>

Add the "status" command in initscript to check the status of ypbind. remove ypbind-yocto.init as ypbind.init, which is the initscript, make its name similar to other recipes

---
.../recipes-support/nis/files/{ypbind-yocto.init => ypbind.init} |
7 +++++++
meta-networking/recipes-support/nis/ypbind-mt_1.38.bb |
4 ++--
meta-networking/recipes-support/nis/ypbind-mt_2.2.bb |
4 ++--

  3 files changed, 11 insertions(+), 4 deletions(-)

rename meta-networking/recipes-support/nis/files/{ypbind-yocto.init
=> ypbind.init} (96%)

diff --git a/meta-networking/recipes-support/nis/files/ypbind-yocto.init b/meta-networking/recipes-support/nis/files/ypbind.init similarity index 96%
rename from meta-networking/recipes-support/nis/files/ypbind-yocto.init rename to meta-networking/recipes-support/nis/files/ypbind.init index 2c50d12..244dc78 100644

meta-networking/recipes-support/nis/files/ypbind.init renamed from meta-networking/recipes-support/nis/files/ypbind-yocto.init +7 -0
@@ -21,6 +21,9 @@
  #    the NIS binding information.
  ### END INIT INFO
 
+# Need to use status function
+. /etc/init.d/functions
+
  YPBIND_BIN=/usr/sbin/ypbind
  pidfile=/var/run/ypbind.pid
 
@@ -92,6 +95,10 @@ case "$1" in
      echo -n "Reload service ypbind"
      start-stop-daemon --stop --quiet --signal 1 --pidfile $pidfile
      ;;
+    status)
+    echo -n "Checking for ypbind: "
+    status $YPBIND_BIN
+    ;;
      *)
      echo "Usage: $0

{start|stop|status|try-restart|restart|force-reload|reload|probe}"
exit 1

meta-networking/recipes-support/nis/ypbind-mt_1.38.bb +1 -2
index d25ef5c..5702cd6 100644
@@ -26,7 +26,7 @@ DEPENDS = " \
  PROVIDES += "ypbind"
 
  SRC_URI = "http://www.linux-nis.org/download/ypbind-mt/${BP}.tar.bz2 \
-           file://ypbind-yocto.init \
+           file://ypbind.init \
             file://ypbind.service \
  "
  SRC_URI[md5sum] = "094088c0e282fa7f3b3dd6cc51d0a4e1"
@@ -44,7 +44,7 @@ do_install_append () {
      install -d ${D}${sysconfdir}/init.d
      install -d ${D}${sysconfdir}/rcS.d
 
-    install -m 0755 ${WORKDIR}/ypbind-yocto.init

${D}${sysconfdir}/init.d/ypbind
+ install -m 0755 ${WORKDIR}/ypbind.init
${D}${sysconfdir}/init.d/ypbind

      install -d ${D}${systemd_unitdir}/system
      install -m 0644 ${WORKDIR}/ypbind.service

${D}${systemd_unitdir}/system

meta-networking/recipes-support/nis/ypbind-mt_2.2.bb +1 -2
index 6a9262a..cee5880 100644
@@ -21,7 +21,7 @@ PROVIDES += "ypbind"
  PNBLACKLIST[ypbind-mt] ?= "BROKEN: Depends on broken yp-tools"
 
  SRC_URI = "http://www.linux-nis.org/download/ypbind-mt/${BP}.tar.bz2 \
-           file://ypbind-yocto.init \
+           file://ypbind.init \
             file://ypbind.service \
  "
  SRC_URI[md5sum] = "54e2040d8266ae7d302d081ca310c8a8"
@@ -41,7 +41,7 @@ do_install_append () {
      install -d ${D}${sysconfdir}/init.d
      install -d ${D}${sysconfdir}/rcS.d
 
-    install -m 0755 ${WORKDIR}/ypbind-yocto.init

${D}${sysconfdir}/init.d/ypbind
+ install -m 0755 ${WORKDIR}/ypbind.init
${D}${sysconfdir}/init.d/ypbind

      install -d ${D}${systemd_unitdir}/system
      install -m 0644 ${WORKDIR}/ypbind.service

${D}${systemd_unitdir}/system

Signature · 2 lines
Best Reagrds,
Roy | RongQing Li
#3 lore raw

after dropping the patch [Re: [oe] [PATCH 1/2] ypbind-mt: get parameters from dhcp],

this patch should be able to applied to master-next.

thanks

-Roy

Quoted 121 lines · Rongqing Li

ping

-Roy

Quoted 115 lines · Rongqing Li

Could we drop the first version of this patch from master-next, {[a314ab41a] ypbind-yocto.init: add status command}

and accept this one

thanks

-Roy

Quoted 103 lines · On 2015年08月13日 08:38, [email protected] wrote:

From: Zhu Yanjun <[email protected]>

Add the "status" command in initscript to check the status of ypbind. remove ypbind-yocto.init as ypbind.init, which is the initscript, make its name similar to other recipes

---
.../recipes-support/nis/files/{ypbind-yocto.init => ypbind.init} |
7 +++++++
meta-networking/recipes-support/nis/ypbind-mt_1.38.bb |
4 ++--
meta-networking/recipes-support/nis/ypbind-mt_2.2.bb |
4 ++--

  3 files changed, 11 insertions(+), 4 deletions(-)

rename meta-networking/recipes-support/nis/files/{ypbind-yocto.init
=> ypbind.init} (96%)

diff --git a/meta-networking/recipes-support/nis/files/ypbind-yocto.init b/meta-networking/recipes-support/nis/files/ypbind.init similarity index 96%
rename from meta-networking/recipes-support/nis/files/ypbind-yocto.init rename to meta-networking/recipes-support/nis/files/ypbind.init index 2c50d12..244dc78 100644

meta-networking/recipes-support/nis/files/ypbind.init renamed from meta-networking/recipes-support/nis/files/ypbind-yocto.init +7 -0
@@ -21,6 +21,9 @@
  #    the NIS binding information.
  ### END INIT INFO
 
+# Need to use status function
+. /etc/init.d/functions
+
  YPBIND_BIN=/usr/sbin/ypbind
  pidfile=/var/run/ypbind.pid
 
@@ -92,6 +95,10 @@ case "$1" in
      echo -n "Reload service ypbind"
      start-stop-daemon --stop --quiet --signal 1 --pidfile $pidfile
      ;;
+    status)
+    echo -n "Checking for ypbind: "
+    status $YPBIND_BIN
+    ;;
      *)
      echo "Usage: $0

{start|stop|status|try-restart|restart|force-reload|reload|probe}"
exit 1

meta-networking/recipes-support/nis/ypbind-mt_1.38.bb +1 -2
index d25ef5c..5702cd6 100644
@@ -26,7 +26,7 @@ DEPENDS = " \
  PROVIDES += "ypbind"
 
  SRC_URI = "http://www.linux-nis.org/download/ypbind-mt/${BP}.tar.bz2 \
-           file://ypbind-yocto.init \
+           file://ypbind.init \
             file://ypbind.service \
  "
  SRC_URI[md5sum] = "094088c0e282fa7f3b3dd6cc51d0a4e1"
@@ -44,7 +44,7 @@ do_install_append () {
      install -d ${D}${sysconfdir}/init.d
      install -d ${D}${sysconfdir}/rcS.d
 
-    install -m 0755 ${WORKDIR}/ypbind-yocto.init

${D}${sysconfdir}/init.d/ypbind
+ install -m 0755 ${WORKDIR}/ypbind.init
${D}${sysconfdir}/init.d/ypbind

      install -d ${D}${systemd_unitdir}/system
      install -m 0644 ${WORKDIR}/ypbind.service

${D}${systemd_unitdir}/system

meta-networking/recipes-support/nis/ypbind-mt_2.2.bb +1 -2
index 6a9262a..cee5880 100644
@@ -21,7 +21,7 @@ PROVIDES += "ypbind"
  PNBLACKLIST[ypbind-mt] ?= "BROKEN: Depends on broken yp-tools"
 
  SRC_URI = "http://www.linux-nis.org/download/ypbind-mt/${BP}.tar.bz2 \
-           file://ypbind-yocto.init \
+           file://ypbind.init \
             file://ypbind.service \
  "
  SRC_URI[md5sum] = "54e2040d8266ae7d302d081ca310c8a8"
@@ -41,7 +41,7 @@ do_install_append () {
      install -d ${D}${sysconfdir}/init.d
      install -d ${D}${sysconfdir}/rcS.d
 
-    install -m 0755 ${WORKDIR}/ypbind-yocto.init

${D}${sysconfdir}/init.d/ypbind
+ install -m 0755 ${WORKDIR}/ypbind.init
${D}${sysconfdir}/init.d/ypbind

      install -d ${D}${systemd_unitdir}/system
      install -m 0644 ${WORKDIR}/ypbind.service

${D}${systemd_unitdir}/system

Signature · 2 lines
Best Reagrds,
Roy | RongQing Li