summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2015-09-14 16:37:30 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-18 09:05:22 +0100
commit32472dcb4e956b901bd02bc3573e9c0b76777739 (patch)
treecdc1b1cb0a4cfcf0518ecff7bc7ba89163901ac9
parentd8eb9d41b0afb48f98dc59383cf886c8ca53c21a (diff)
downloadpoky-32472dcb4e956b901bd02bc3573e9c0b76777739.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. (From OE-Core rev: 487d4b4d5521ca490e22668ca66921504a1b898f) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-core/glibc/glibc/nscd-no-bash.patch61
-rw-r--r--meta/recipes-core/glibc/glibc_2.22.bb1
2 files changed, 62 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 @@
1Don't use bashisms (except for echo -n, which busybox supports) to avoid needing bash to start nscd.
2
3Upstream-Status: Pending
4Signed-off-by: Ross Burton <ross.burton@intel.com>
5
6diff --git a/nscd/nscd.init b/nscd/nscd.init
7index a882da7..b02986e 100644
8--- a/nscd/nscd.init
9+++ b/nscd/nscd.init
10@@ -1,4 +1,4 @@
11-#!/bin/bash
12+#!/bin/sh
13 #
14 # nscd: Starts the Name Switch Cache Daemon
15 #
16@@ -49,7 +49,7 @@ prog=nscd
17 start () {
18 [ -d /var/run/nscd ] || mkdir /var/run/nscd
19 [ -d /var/db/nscd ] || mkdir /var/db/nscd
20- echo -n $"Starting $prog: "
21+ echo -n "Starting $prog: "
22 daemon /usr/sbin/nscd
23 RETVAL=$?
24 echo
25@@ -58,7 +58,7 @@ start () {
26 }
27
28 stop () {
29- echo -n $"Stopping $prog: "
30+ echo -n "Stopping $prog: "
31 /usr/sbin/nscd -K
32 RETVAL=$?
33 if [ $RETVAL -eq 0 ]; then
34@@ -67,9 +67,9 @@ stop () {
35 # a non-privileged user
36 rm -f /var/run/nscd/nscd.pid
37 rm -f /var/run/nscd/socket
38- success $"$prog shutdown"
39+ success "$prog shutdown"
40 else
41- failure $"$prog shutdown"
42+ failure "$prog shutdown"
43 fi
44 echo
45 return $RETVAL
46@@ -103,13 +103,13 @@ case "$1" in
47 RETVAL=$?
48 ;;
49 force-reload | reload)
50- echo -n $"Reloading $prog: "
51+ echo -n "Reloading $prog: "
52 killproc /usr/sbin/nscd -HUP
53 RETVAL=$?
54 echo
55 ;;
56 *)
57- echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}"
58+ echo "Usage: $0 {start|stop|status|restart|reload|condrestart}"
59 RETVAL=1
60 ;;
61 esac
diff --git a/meta/recipes-core/glibc/glibc_2.22.bb b/meta/recipes-core/glibc/glibc_2.22.bb
index f0e1fad450..09f0428ea2 100644
--- a/meta/recipes-core/glibc/glibc_2.22.bb
+++ b/meta/recipes-core/glibc/glibc_2.22.bb
@@ -38,6 +38,7 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${BRANCH};name=glibc \
38 file://0025-eglibc-Install-PIC-archives.patch \ 38 file://0025-eglibc-Install-PIC-archives.patch \
39 file://0026-eglibc-dl_debug_mask-is-controlled-by-__OPTION_EGLIB.patch \ 39 file://0026-eglibc-dl_debug_mask-is-controlled-by-__OPTION_EGLIB.patch \
40 file://0027-eglibc-use-option-groups-Conditionally-exclude-c-tes.patch \ 40 file://0027-eglibc-use-option-groups-Conditionally-exclude-c-tes.patch \
41 file://nscd-no-bash.patch \
41" 42"
42 43
43SRC_URI += "\ 44SRC_URI += "\