diff options
author | Zhu Yanjun <yanjun.zhu@windriver.com> | 2015-08-13 08:38:32 +0800 |
---|---|---|
committer | Joe MacDonald <joe_macdonald@mentor.com> | 2015-09-11 10:27:37 -0400 |
commit | d3eaede791c121147f1b99db01facd2080019993 (patch) | |
tree | 82d5aed2efe9bd78107bd358c201c57c80e776a5 /meta-networking | |
parent | d36e2d1066f50036080f978583a58fe79ecfac54 (diff) | |
download | meta-openembedded-d3eaede791c121147f1b99db01facd2080019993.tar.gz |
ypbind-mt: add status command for initscript
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
Signed-off-by: Zhu Yanjun <yanjun.zhu@windriver.com>
Signed-off-by: Roy Li <rongqing.li@windriver.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
Diffstat (limited to 'meta-networking')
-rw-r--r-- | meta-networking/recipes-support/nis/files/ypbind.init (renamed from meta-networking/recipes-support/nis/files/ypbind-yocto.init) | 7 | ||||
-rw-r--r-- | meta-networking/recipes-support/nis/ypbind-mt_1.38.bb | 4 | ||||
-rw-r--r-- | meta-networking/recipes-support/nis/ypbind-mt_2.2.bb | 4 |
3 files changed, 11 insertions, 4 deletions
diff --git a/meta-networking/recipes-support/nis/files/ypbind-yocto.init b/meta-networking/recipes-support/nis/files/ypbind.init index 2c50d12e63..244dc78bca 100644 --- a/meta-networking/recipes-support/nis/files/ypbind-yocto.init +++ b/meta-networking/recipes-support/nis/files/ypbind.init | |||
@@ -21,6 +21,9 @@ | |||
21 | # the NIS binding information. | 21 | # the NIS binding information. |
22 | ### END INIT INFO | 22 | ### END INIT INFO |
23 | 23 | ||
24 | # Need to use status function | ||
25 | . /etc/init.d/functions | ||
26 | |||
24 | YPBIND_BIN=/usr/sbin/ypbind | 27 | YPBIND_BIN=/usr/sbin/ypbind |
25 | pidfile=/var/run/ypbind.pid | 28 | pidfile=/var/run/ypbind.pid |
26 | 29 | ||
@@ -92,6 +95,10 @@ case "$1" in | |||
92 | echo -n "Reload service ypbind" | 95 | echo -n "Reload service ypbind" |
93 | start-stop-daemon --stop --quiet --signal 1 --pidfile $pidfile | 96 | start-stop-daemon --stop --quiet --signal 1 --pidfile $pidfile |
94 | ;; | 97 | ;; |
98 | status) | ||
99 | echo -n "Checking for ypbind: " | ||
100 | status $YPBIND_BIN | ||
101 | ;; | ||
95 | *) | 102 | *) |
96 | echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}" | 103 | echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}" |
97 | exit 1 | 104 | exit 1 |
diff --git a/meta-networking/recipes-support/nis/ypbind-mt_1.38.bb b/meta-networking/recipes-support/nis/ypbind-mt_1.38.bb index d25ef5c754..5702cd6a5f 100644 --- a/meta-networking/recipes-support/nis/ypbind-mt_1.38.bb +++ b/meta-networking/recipes-support/nis/ypbind-mt_1.38.bb | |||
@@ -26,7 +26,7 @@ DEPENDS = " \ | |||
26 | PROVIDES += "ypbind" | 26 | PROVIDES += "ypbind" |
27 | 27 | ||
28 | SRC_URI = "http://www.linux-nis.org/download/ypbind-mt/${BP}.tar.bz2 \ | 28 | SRC_URI = "http://www.linux-nis.org/download/ypbind-mt/${BP}.tar.bz2 \ |
29 | file://ypbind-yocto.init \ | 29 | file://ypbind.init \ |
30 | file://ypbind.service \ | 30 | file://ypbind.service \ |
31 | " | 31 | " |
32 | SRC_URI[md5sum] = "094088c0e282fa7f3b3dd6cc51d0a4e1" | 32 | SRC_URI[md5sum] = "094088c0e282fa7f3b3dd6cc51d0a4e1" |
@@ -44,7 +44,7 @@ do_install_append () { | |||
44 | install -d ${D}${sysconfdir}/init.d | 44 | install -d ${D}${sysconfdir}/init.d |
45 | install -d ${D}${sysconfdir}/rcS.d | 45 | install -d ${D}${sysconfdir}/rcS.d |
46 | 46 | ||
47 | install -m 0755 ${WORKDIR}/ypbind-yocto.init ${D}${sysconfdir}/init.d/ypbind | 47 | install -m 0755 ${WORKDIR}/ypbind.init ${D}${sysconfdir}/init.d/ypbind |
48 | 48 | ||
49 | install -d ${D}${systemd_unitdir}/system | 49 | install -d ${D}${systemd_unitdir}/system |
50 | install -m 0644 ${WORKDIR}/ypbind.service ${D}${systemd_unitdir}/system | 50 | install -m 0644 ${WORKDIR}/ypbind.service ${D}${systemd_unitdir}/system |
diff --git a/meta-networking/recipes-support/nis/ypbind-mt_2.2.bb b/meta-networking/recipes-support/nis/ypbind-mt_2.2.bb index 6a9262acab..cee5880f7a 100644 --- a/meta-networking/recipes-support/nis/ypbind-mt_2.2.bb +++ b/meta-networking/recipes-support/nis/ypbind-mt_2.2.bb | |||
@@ -21,7 +21,7 @@ PROVIDES += "ypbind" | |||
21 | PNBLACKLIST[ypbind-mt] ?= "BROKEN: Depends on broken yp-tools" | 21 | PNBLACKLIST[ypbind-mt] ?= "BROKEN: Depends on broken yp-tools" |
22 | 22 | ||
23 | SRC_URI = "http://www.linux-nis.org/download/ypbind-mt/${BP}.tar.bz2 \ | 23 | SRC_URI = "http://www.linux-nis.org/download/ypbind-mt/${BP}.tar.bz2 \ |
24 | file://ypbind-yocto.init \ | 24 | file://ypbind.init \ |
25 | file://ypbind.service \ | 25 | file://ypbind.service \ |
26 | " | 26 | " |
27 | SRC_URI[md5sum] = "54e2040d8266ae7d302d081ca310c8a8" | 27 | SRC_URI[md5sum] = "54e2040d8266ae7d302d081ca310c8a8" |
@@ -41,7 +41,7 @@ do_install_append () { | |||
41 | install -d ${D}${sysconfdir}/init.d | 41 | install -d ${D}${sysconfdir}/init.d |
42 | install -d ${D}${sysconfdir}/rcS.d | 42 | install -d ${D}${sysconfdir}/rcS.d |
43 | 43 | ||
44 | install -m 0755 ${WORKDIR}/ypbind-yocto.init ${D}${sysconfdir}/init.d/ypbind | 44 | install -m 0755 ${WORKDIR}/ypbind.init ${D}${sysconfdir}/init.d/ypbind |
45 | 45 | ||
46 | install -d ${D}${systemd_unitdir}/system | 46 | install -d ${D}${systemd_unitdir}/system |
47 | install -m 0644 ${WORKDIR}/ypbind.service ${D}${systemd_unitdir}/system | 47 | install -m 0644 ${WORKDIR}/ypbind.service ${D}${systemd_unitdir}/system |