Skip to content

Commit

Permalink
auto.diod.in: remove bashisms
Browse files Browse the repository at this point in the history
Signed-off-by: Roy Li <rongqing.li@windriver.com>
  • Loading branch information
Roy Li authored and snogge committed Mar 6, 2024
1 parent 9da28f9 commit 131d6ef
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions scripts/auto.diod.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh
#
# auto.diod - executable automounter map for diod file systems
#
Expand Down Expand Up @@ -41,15 +41,15 @@ dcatopts="${DIOD_TIMEOUT:+-t $DIOD_TIMEOUT}"
for server in $DIOD_SERVERS; do
$DIOD_DIODCAT -s $server $dcatopts exports | awk '{print $1}' |\
while read path; do
if [ "$path" == "/" ]; then
if [ "$key" == "ROOT" ]; then
if [ "$path" = "/" ]; then
if [ "$key" = "ROOT" ]; then
echo "$prefix $server:$path"
exit 0
fi
elif [ "$key" == "$(echo $path|sed -e's/^\///' -e's/\//./g')" ] \
|| [ "$key" == "$(echo $path|sed -e's/^\///' -e's/\//_/g')" ] \
|| [ "$key" == "$(echo $path|sed -e's/^\///' -e's/\//-/g')" ] \
|| [ "$key" == "$(basename $path)" ]; then
elif [ "$key" = "$(echo $path|sed -e's/^\///' -e's/\//./g')" ] \
|| [ "$key" = "$(echo $path|sed -e's/^\///' -e's/\//_/g')" ] \
|| [ "$key" = "$(echo $path|sed -e's/^\///' -e's/\//-/g')" ] \
|| [ "$key" = "$(basename $path)" ]; then
echo "$prefix $server:$path"
exit 0
fi
Expand Down

0 comments on commit 131d6ef

Please sign in to comment.