1From cfacbb917f87b903b50132a5025f86b0cc522e9c Mon Sep 17 00:00:00 2001 2From: Robert Yang <liezhi.yang@windriver.com> 3Date: Sat, 13 Sep 2014 20:19:28 -0700 4Subject: [PATCH] autofs.init.in: remove bashism 5 6It can work without the bashism. 7 8Upstream-Status: Pending 9 10Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl> 11Signed-off-by: Robert Yang <liezhi.yang@windriver.com> 12 13--- 14 redhat/autofs.init.in | 12 ++++++------ 15 samples/rc.autofs.in | 10 +++++----- 16 2 files changed, 11 insertions(+), 11 deletions(-) 17 18diff --git a/redhat/autofs.init.in b/redhat/autofs.init.in 19index 9d008ff..4f1c0d8 100644 20--- a/redhat/autofs.init.in 21+++ b/redhat/autofs.init.in 22@@ -1,4 +1,4 @@ 23-#!/bin/bash 24+#!/bin/sh 25 # 26 # rc file for automount using a Sun-style "master map". 27 # 28@@ -42,7 +42,7 @@ if [ -r $confdir/autofs ]; then 29 . $confdir/autofs 30 fi 31 32-function start() { 33+start() { 34 # Make sure autofs4 module is loaded 35 if ! grep -q autofs /proc/filesystems 36 then 37@@ -102,7 +102,7 @@ function start() { 38 return $RETVAL 39 } 40 41-function stop() { 42+stop() { 43 echo -n $"Stopping $prog: " 44 count=0 45 while [ -n "`pidof $prog`" -a $count -lt 15 ] ; do 46@@ -125,7 +125,7 @@ function stop() { 47 return $RETVAL 48 } 49 50-function restart() { 51+restart() { 52 status autofs > /dev/null 2>&1 53 if [ $? -eq 0 ]; then 54 stop 55@@ -143,7 +143,7 @@ function restart() { 56 start 57 } 58 59-function reload() { 60+reload() { 61 if [ ! -f /var/lock/subsys/autofs ]; then 62 echo $"$prog not running" 63 RETVAL=1 64@@ -161,7 +161,7 @@ function reload() { 65 return $RETVAL 66 } 67 68-function usage_message() { 69+usage_message() { 70 echo $"Usage: $0 {start|forcestart|stop|status|restart|force-reload|forcerestart|reload|condrestart|try-restart|usage}" 71 } 72 73diff --git a/samples/rc.autofs.in b/samples/rc.autofs.in 74index 487669f..e96cde1 100644 75--- a/samples/rc.autofs.in 76+++ b/samples/rc.autofs.in 77@@ -1,4 +1,4 @@ 78-#!/bin/bash 79+#!/bin/sh 80 # 81 # rc file for automount using a Sun-style "master map". 82 # 83@@ -36,7 +36,7 @@ if [ -r $confdir/autofs ]; then 84 . $confdir/autofs 85 fi 86 87-function start() { 88+start() { 89 echo -n "Starting $prog: " 90 91 # Make sure autofs4 module is loaded 92@@ -85,7 +85,7 @@ function start() { 93 return $RETVAL 94 } 95 96-function stop() { 97+stop() { 98 echo -n $"Stopping $prog: " 99 count=0 100 while [ -n "`pidof $prog`" -a $count -lt 15 ] ; do 101@@ -102,7 +102,7 @@ function stop() { 102 return $RETVAL 103 } 104 105-function restart() { 106+restart() { 107 stop 108 while [ -n "`pidof $prog`" ] ; do 109 sleep 5 110@@ -110,7 +110,7 @@ function restart() { 111 start 112 } 113 114-function reload() { 115+reload() { 116 pid=`pidof $prog` 117 if [ -z $pid ]; then 118 echo $"$prog not running" 119