diff options
author | Ross Burton <ross.burton@intel.com> | 2015-09-14 16:37:30 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-09-16 21:38:18 +0100 |
commit | 487d4b4d5521ca490e22668ca66921504a1b898f (patch) | |
tree | e1174cccb00e25fe1276b5518a248397b2c63326 /meta/recipes-core/glibc/glibc | |
parent | ce9a7501ea29ddba61ef7c297223b3f7eca5a2a1 (diff) | |
download | openembedded-core-contrib-487d4b4d5521ca490e22668ca66921504a1b898f.tar.gz |
glibc: don't require bash for nscd init script
The nscd init script uses #! /bin/bash but only really uses one bashism
(translated strings), so remove them and switch the shell to #! /bin/sh.
Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/recipes-core/glibc/glibc')
-rw-r--r-- | meta/recipes-core/glibc/glibc/nscd-no-bash.patch | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/meta/recipes-core/glibc/glibc/nscd-no-bash.patch b/meta/recipes-core/glibc/glibc/nscd-no-bash.patch new file mode 100644 index 0000000000..c306ce6afe --- /dev/null +++ b/meta/recipes-core/glibc/glibc/nscd-no-bash.patch @@ -0,0 +1,61 @@ +Don't use bashisms (except for echo -n, which busybox supports) to avoid needing bash to start nscd. + +Upstream-Status: Pending +Signed-off-by: Ross Burton <ross.burton@intel.com> + +diff --git a/nscd/nscd.init b/nscd/nscd.init +index a882da7..b02986e 100644 +--- a/nscd/nscd.init ++++ b/nscd/nscd.init +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + # + # nscd: Starts the Name Switch Cache Daemon + # +@@ -49,7 +49,7 @@ prog=nscd + start () { + [ -d /var/run/nscd ] || mkdir /var/run/nscd + [ -d /var/db/nscd ] || mkdir /var/db/nscd +- echo -n $"Starting $prog: " ++ echo -n "Starting $prog: " + daemon /usr/sbin/nscd + RETVAL=$? + echo +@@ -58,7 +58,7 @@ start () { + } + + stop () { +- echo -n $"Stopping $prog: " ++ echo -n "Stopping $prog: " + /usr/sbin/nscd -K + RETVAL=$? + if [ $RETVAL -eq 0 ]; then +@@ -67,9 +67,9 @@ stop () { + # a non-privileged user + rm -f /var/run/nscd/nscd.pid + rm -f /var/run/nscd/socket +- success $"$prog shutdown" ++ success "$prog shutdown" + else +- failure $"$prog shutdown" ++ failure "$prog shutdown" + fi + echo + return $RETVAL +@@ -103,13 +103,13 @@ case "$1" in + RETVAL=$? + ;; + force-reload | reload) +- echo -n $"Reloading $prog: " ++ echo -n "Reloading $prog: " + killproc /usr/sbin/nscd -HUP + RETVAL=$? + echo + ;; + *) +- echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}" ++ echo "Usage: $0 {start|stop|status|restart|reload|condrestart}" + RETVAL=1 + ;; + esac |