diff options
author | Amy Fong <amy.fong@windriver.com> | 2012-07-25 15:53:42 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-05-30 20:59:13 +0100 |
commit | e2a8080fbcb90bbaf963a80883428180c1b4ae42 (patch) | |
tree | a2d94e86b5d4ce2c7025d7918059ff111f4cf0ad /meta/recipes-connectivity | |
parent | 0ef93c5ee9a0e35d993ec8c6b9d7e8ffcf767b4b (diff) | |
download | poky-e2a8080fbcb90bbaf963a80883428180c1b4ae42.tar.gz |
portmap: /etc/init.d/portmap restart complains "command not found"
portmap splits pmap_dump and pmap_set into a different package:
portmap_utils. Since this package might not be installed, I introduce
another init file that tests for the existance of these apps before trying
to run the pmap_* commands.
(From OE-Core rev: cfa813dfc8d8d4d45d9f995d20322a3226a4e20b)
Signed-off-by: Amy Fong <amy.fong@windriver.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity')
-rwxr-xr-x | meta/recipes-connectivity/portmap/portmap/portmap.init | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/meta/recipes-connectivity/portmap/portmap/portmap.init b/meta/recipes-connectivity/portmap/portmap/portmap.init index e46513e115..621aa171ae 100755 --- a/meta/recipes-connectivity/portmap/portmap/portmap.init +++ b/meta/recipes-connectivity/portmap/portmap/portmap.init | |||
@@ -40,14 +40,22 @@ case "$1" in | |||
40 | $0 restart | 40 | $0 restart |
41 | ;; | 41 | ;; |
42 | restart) | 42 | restart) |
43 | pmap_dump >/var/run/portmap.state | 43 | # pmap_dump and pmap_set may be in a different package and not installed... |
44 | if [ -f /sbin/pmap_dump -a -f /sbin/pmap_set ]; then | ||
45 | do_state=1 | ||
46 | else | ||
47 | do_state=0 | ||
48 | fi | ||
49 | [ $do_state -eq 1 ] && pmap_dump >/var/run/portmap.state | ||
44 | $0 stop | 50 | $0 stop |
45 | $0 start | 51 | $0 start |
46 | if [ ! -f /var/run/portmap.upgrade-state ]; then | 52 | if [ $do_state -eq 1 ]; then |
47 | sleep 1 | 53 | if [ ! -f /var/run/portmap.upgrade-state ]; then |
48 | pmap_set </var/run/portmap.state | 54 | sleep 1 |
55 | pmap_set </var/run/portmap.state | ||
56 | fi | ||
57 | rm -f /var/run/portmap.state | ||
49 | fi | 58 | fi |
50 | rm -f /var/run/portmap.state | ||
51 | ;; | 59 | ;; |
52 | *) | 60 | *) |
53 | echo "Usage: /etc/init.d/portmap {start|stop|reload|restart}" | 61 | echo "Usage: /etc/init.d/portmap {start|stop|reload|restart}" |