Skip to content

Commit

Permalink
Fix shell script finding (#140)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichalGuzieniuk authored Oct 9, 2020
1 parent c0fdaf0 commit c822350
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions images/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@ SRIOV_BIN_FILE="/usr/bin/sriov"
# Give help text for parameters.
usage()
{
/bin/echo -e "This is an entrypoint script for SR-IOV CNI to overlay its"
/bin/echo -e "binary into location in a filesystem. The binary file will"
/bin/echo -e "be copied to the corresponding directory."
/bin/echo -e ""
/bin/echo -e "./entrypoint.sh"
/bin/echo -e "\t-h --help"
/bin/echo -e "\t--cni-bin-dir=$CNI_BIN_DIR"
/bin/echo -e "\t--sriov-bin-file=$SRIOV_BIN_FILE"
printf "This is an entrypoint script for SR-IOV CNI to overlay its\n"
printf "binary into location in a filesystem. The binary file will\n"
printf "be copied to the corresponding directory.\n"
printf "\n"
printf "./entrypoint.sh\n"
printf "\t-h --help\n"
printf "\t--cni-bin-dir=%s\n" $CNI_BIN_DIR
printf "\t--sriov-bin-file=%s\n" $SRIOV_BIN_FILE
}

# Parse parameters given as arguments to this script.
while [ "$1" != "" ]; do
PARAM=`echo $1 | awk -F= '{print $1}'`
VALUE=`echo $1 | awk -F= '{print $2}'`
PARAM=$(echo "$1" | awk -F= '{print $1}')
VALUE=$(echo "$1" | awk -F= '{print $2}')
case $PARAM in
-h | --help)
usage
Expand Down Expand Up @@ -55,7 +55,7 @@ do
done

# Copy file into proper place.
cp -f $SRIOV_BIN_FILE $CNI_BIN_DIR
cp -f "$SRIOV_BIN_FILE" "$CNI_BIN_DIR"

echo "Entering sleep... (success)"

Expand Down

0 comments on commit c822350

Please # to comment.