diff options
| author | Robert Yang <liezhi.yang@windriver.com> | 2014-09-13 20:24:11 -0700 |
|---|---|---|
| committer | Martin Jansa <Martin.Jansa@gmail.com> | 2014-09-26 05:41:50 +0200 |
| commit | 5b17d7cf94077b8ab40bf5aa00282087fa5c179b (patch) | |
| tree | 07c60fba184d16f292cd9718b1c23c46368c7e6d /meta-networking | |
| parent | 7d6091297f3fa1d6131dd60360f2b0103987a80f (diff) | |
| download | meta-openembedded-5b17d7cf94077b8ab40bf5aa00282087fa5c179b.tar.gz | |
autofs: remove bashism
The autofs.init can work with /bin/sh in busybox, so remove bashsim.
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Diffstat (limited to 'meta-networking')
| -rw-r--r-- | meta-networking/recipes-daemons/autofs/autofs-5.1.0/remove-bashism.patch | 120 | ||||
| -rw-r--r-- | meta-networking/recipes-daemons/autofs/autofs_5.1.0.bb | 1 |
2 files changed, 121 insertions, 0 deletions
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.1.0/remove-bashism.patch b/meta-networking/recipes-daemons/autofs/autofs-5.1.0/remove-bashism.patch new file mode 100644 index 0000000000..282d6f0ad2 --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs-5.1.0/remove-bashism.patch | |||
| @@ -0,0 +1,120 @@ | |||
| 1 | From 79034f969bbd12215d65b4337dfd38a13d02d4ef Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Robert Yang <liezhi.yang@windriver.com> | ||
| 3 | Date: Sat, 13 Sep 2014 20:19:28 -0700 | ||
| 4 | Subject: [PATCH] autofs.init.in: remove bashism | ||
| 5 | |||
| 6 | It can work without the bashism. | ||
| 7 | |||
| 8 | Upstream-Status: Pending | ||
| 9 | |||
| 10 | Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl> | ||
| 11 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | ||
| 12 | --- | ||
| 13 | redhat/autofs.init.in | 12 ++++++------ | ||
| 14 | samples/rc.autofs.in | 10 +++++----- | ||
| 15 | 2 files changed, 11 insertions(+), 11 deletions(-) | ||
| 16 | |||
| 17 | diff --git a/redhat/autofs.init.in b/redhat/autofs.init.in | ||
| 18 | index 9d008ff..4f1c0d8 100644 | ||
| 19 | --- a/redhat/autofs.init.in | ||
| 20 | +++ b/redhat/autofs.init.in | ||
| 21 | @@ -1,4 +1,4 @@ | ||
| 22 | -#!/bin/bash | ||
| 23 | +#!/bin/sh | ||
| 24 | # | ||
| 25 | # rc file for automount using a Sun-style "master map". | ||
| 26 | # | ||
| 27 | @@ -42,7 +42,7 @@ if [ -r $confdir/autofs ]; then | ||
| 28 | . $confdir/autofs | ||
| 29 | fi | ||
| 30 | |||
| 31 | -function start() { | ||
| 32 | +start() { | ||
| 33 | # Make sure autofs4 module is loaded | ||
| 34 | if ! grep -q autofs /proc/filesystems | ||
| 35 | then | ||
| 36 | @@ -102,7 +102,7 @@ function start() { | ||
| 37 | return $RETVAL | ||
| 38 | } | ||
| 39 | |||
| 40 | -function stop() { | ||
| 41 | +stop() { | ||
| 42 | echo -n $"Stopping $prog: " | ||
| 43 | count=0 | ||
| 44 | while [ -n "`pidof $prog`" -a $count -lt 15 ] ; do | ||
| 45 | @@ -125,7 +125,7 @@ function stop() { | ||
| 46 | return $RETVAL | ||
| 47 | } | ||
| 48 | |||
| 49 | -function restart() { | ||
| 50 | +restart() { | ||
| 51 | status autofs > /dev/null 2>&1 | ||
| 52 | if [ $? -eq 0 ]; then | ||
| 53 | stop | ||
| 54 | @@ -143,7 +143,7 @@ function restart() { | ||
| 55 | start | ||
| 56 | } | ||
| 57 | |||
| 58 | -function reload() { | ||
| 59 | +reload() { | ||
| 60 | if [ ! -f /var/lock/subsys/autofs ]; then | ||
| 61 | echo $"$prog not running" | ||
| 62 | RETVAL=1 | ||
| 63 | @@ -161,7 +161,7 @@ function reload() { | ||
| 64 | return $RETVAL | ||
| 65 | } | ||
| 66 | |||
| 67 | -function usage_message() { | ||
| 68 | +usage_message() { | ||
| 69 | echo $"Usage: $0 {start|forcestart|stop|status|restart|force-reload|forcerestart|reload|condrestart|try-restart|usage}" | ||
| 70 | } | ||
| 71 | |||
| 72 | diff --git a/samples/rc.autofs.in b/samples/rc.autofs.in | ||
| 73 | index 487669f..e96cde1 100644 | ||
| 74 | --- a/samples/rc.autofs.in | ||
| 75 | +++ b/samples/rc.autofs.in | ||
| 76 | @@ -1,4 +1,4 @@ | ||
| 77 | -#!/bin/bash | ||
| 78 | +#!/bin/sh | ||
| 79 | # | ||
| 80 | # rc file for automount using a Sun-style "master map". | ||
| 81 | # | ||
| 82 | @@ -36,7 +36,7 @@ if [ -r $confdir/autofs ]; then | ||
| 83 | . $confdir/autofs | ||
| 84 | fi | ||
| 85 | |||
| 86 | -function start() { | ||
| 87 | +start() { | ||
| 88 | echo -n "Starting $prog: " | ||
| 89 | |||
| 90 | # Make sure autofs4 module is loaded | ||
| 91 | @@ -85,7 +85,7 @@ function start() { | ||
| 92 | return $RETVAL | ||
| 93 | } | ||
| 94 | |||
| 95 | -function stop() { | ||
| 96 | +stop() { | ||
| 97 | echo -n $"Stopping $prog: " | ||
| 98 | count=0 | ||
| 99 | while [ -n "`pidof $prog`" -a $count -lt 15 ] ; do | ||
| 100 | @@ -102,7 +102,7 @@ function stop() { | ||
| 101 | return $RETVAL | ||
| 102 | } | ||
| 103 | |||
| 104 | -function restart() { | ||
| 105 | +restart() { | ||
| 106 | stop | ||
| 107 | while [ -n "`pidof $prog`" ] ; do | ||
| 108 | sleep 5 | ||
| 109 | @@ -110,7 +110,7 @@ function restart() { | ||
| 110 | start | ||
| 111 | } | ||
| 112 | |||
| 113 | -function reload() { | ||
| 114 | +reload() { | ||
| 115 | pid=`pidof $prog` | ||
| 116 | if [ -z $pid ]; then | ||
| 117 | echo $"$prog not running" | ||
| 118 | -- | ||
| 119 | 1.7.9.5 | ||
| 120 | |||
diff --git a/meta-networking/recipes-daemons/autofs/autofs_5.1.0.bb b/meta-networking/recipes-daemons/autofs/autofs_5.1.0.bb index aab2187745..13af2fe45f 100644 --- a/meta-networking/recipes-daemons/autofs/autofs_5.1.0.bb +++ b/meta-networking/recipes-daemons/autofs/autofs_5.1.0.bb | |||
| @@ -19,6 +19,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/daemons/autofs/v5/autofs-${PV}.tar.gz \ | |||
| 19 | file://add-the-needed-stdarg.h.patch \ | 19 | file://add-the-needed-stdarg.h.patch \ |
| 20 | file://using-pkg-config-to-detect-libxml-2.0-and-krb5.patch \ | 20 | file://using-pkg-config-to-detect-libxml-2.0-and-krb5.patch \ |
| 21 | file://force-STRIP-to-emtpy.patch \ | 21 | file://force-STRIP-to-emtpy.patch \ |
| 22 | file://remove-bashism.patch \ | ||
| 22 | " | 23 | " |
| 23 | 24 | ||
| 24 | SRC_URI[md5sum] = "b7724a9a55923f3c06933a8dfd1e79d3" | 25 | SRC_URI[md5sum] = "b7724a9a55923f3c06933a8dfd1e79d3" |
