mirror of
git://git.openembedded.org/meta-openembedded
synced 2026-10-02 14:44:06 +00:00
ypbind: remove bashisms from initscript
Remove three very minor bashisms, all about redirecting stdout/stderr. The initscript identifies as /bin/sh, this change ensures that the script should work with a non-bash /bin/sh as well. Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
This commit is contained in:
parent
f637fadb10
commit
fb815a114b
@ -31,13 +31,13 @@ case "$1" in
|
|||||||
echo -n "Starting ypbind"
|
echo -n "Starting ypbind"
|
||||||
## If the domainname is not set, skip starting of ypbind
|
## If the domainname is not set, skip starting of ypbind
|
||||||
## and return with "program not configured"
|
## and return with "program not configured"
|
||||||
/bin/ypdomainname &> /dev/null
|
/bin/ypdomainname >/dev/null 2>&1
|
||||||
if [ $? -ne 0 -o -z "`/bin/ypdomainname 2>/dev/null`" ]; then
|
if [ $? -ne 0 -o -z "`/bin/ypdomainname 2>/dev/null`" ]; then
|
||||||
if [ -f /etc/defaultdomain ]; then
|
if [ -f /etc/defaultdomain ]; then
|
||||||
XDOMAINNAME=`cat /etc/defaultdomain`
|
XDOMAINNAME=`cat /etc/defaultdomain`
|
||||||
/bin/ypdomainname "$XDOMAINNAME"
|
/bin/ypdomainname "$XDOMAINNAME"
|
||||||
fi
|
fi
|
||||||
/bin/ypdomainname &> /dev/null
|
/bin/ypdomainname >/dev/null 2>&1
|
||||||
if [ $? -ne 0 -o -z "`/bin/ypdomainname 2>/dev/null`" ]; then
|
if [ $? -ne 0 -o -z "`/bin/ypdomainname 2>/dev/null`" ]; then
|
||||||
# Tell the user this has skipped
|
# Tell the user this has skipped
|
||||||
echo -n " . . . . . . . . . . No domainname set"
|
echo -n " . . . . . . . . . . No domainname set"
|
||||||
@ -66,7 +66,7 @@ case "$1" in
|
|||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
notfound=1
|
notfound=1
|
||||||
for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15; do
|
for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15; do
|
||||||
ypwhich &>/dev/null && { notfound=0 ; break; };
|
ypwhich >/dev/null 2>&1 && { notfound=0 ; break; };
|
||||||
echo -n " ."
|
echo -n " ."
|
||||||
sleep 1;
|
sleep 1;
|
||||||
done
|
done
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user