aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-daemons/autofs/autofs/remove-bashism.patch
blob: 4183069bb1d7313da4b00ad62d713c37c745503e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
From cfacbb917f87b903b50132a5025f86b0cc522e9c Mon Sep 17 00:00:00 2001
From: Robert Yang <liezhi.yang@windriver.com>
Date: Sat, 13 Sep 2014 20:19:28 -0700
Subject: [PATCH] autofs.init.in: remove bashism

It can work without the bashism.

Upstream-Status: Pending

Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>

---
 redhat/autofs.init.in | 12 ++++++------
 samples/rc.autofs.in  | 10 +++++-----
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/redhat/autofs.init.in b/redhat/autofs.init.in
index 9d008ff..4f1c0d8 100644
--- a/redhat/autofs.init.in
+++ b/redhat/autofs.init.in
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 #
 # rc file for automount using a Sun-style "master map".
 #
@@ -42,7 +42,7 @@ if [ -r $confdir/autofs ]; then
 	. $confdir/autofs
 fi
 
-function start() {
+start() {
 	# Make sure autofs4 module is loaded
 	if ! grep -q autofs /proc/filesystems
 	then
@@ -102,7 +102,7 @@ function start() {
 	return $RETVAL
 }
 
-function stop() {
+stop() {
 	echo -n $"Stopping $prog: "
 	count=0
 	while [ -n "`pidof $prog`" -a $count -lt 15 ] ; do
@@ -125,7 +125,7 @@ function stop() {
 	return $RETVAL
 }
 
-function restart() {
+restart() {
 	status autofs > /dev/null 2>&1
 	if [ $? -eq 0 ]; then
 		stop
@@ -143,7 +143,7 @@ function restart() {
 	start
 }
 
-function reload() {
+reload() {
 	if [ ! -f /var/lock/subsys/autofs ]; then
 		echo $"$prog not running"
 		RETVAL=1
@@ -161,7 +161,7 @@ function reload() {
 	return $RETVAL
 }
 
-function usage_message() {
+usage_message() {
 	echo $"Usage: $0 {start|forcestart|stop|status|restart|force-reload|forcerestart|reload|condrestart|try-restart|usage}"
 }
 
diff --git a/samples/rc.autofs.in b/samples/rc.autofs.in
index 487669f..e96cde1 100644
--- a/samples/rc.autofs.in
+++ b/samples/rc.autofs.in
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 #
 # rc file for automount using a Sun-style "master map".
 #
@@ -36,7 +36,7 @@ if [ -r $confdir/autofs ]; then
 	. $confdir/autofs
 fi
 
-function start() {
+start() {
 	echo -n "Starting $prog: "
 
 	# Make sure autofs4 module is loaded
@@ -85,7 +85,7 @@ function start() {
 	return $RETVAL
 }
 
-function stop() {
+stop() {
 	echo -n $"Stopping $prog: "
 	count=0
 	while [ -n "`pidof $prog`" -a $count -lt 15 ] ; do
@@ -102,7 +102,7 @@ function stop() {
 	return $RETVAL
 }
 
-function restart() {
+restart() {
 	stop
 	while [ -n "`pidof $prog`" ] ; do
 		sleep 5
@@ -110,7 +110,7 @@ function restart() {
 	start
 }
 
-function reload() {
+reload() {
 	pid=`pidof $prog`
 	if [ -z $pid ]; then
 		echo $"$prog not running"