forked from rexray/rexray
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request rexray#1133 from codenrhoden/docs/csi-nfs
Use CentOS as base for csi-nfs docker plugin
- Loading branch information
Showing
3 changed files
with
87 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/bin/bash | ||
# shellcheck shell=dash | ||
set -e | ||
|
||
# first arg is `--some-option` | ||
if [ "$(echo "$1" | \ | ||
awk '{ string=substr($0, 1, 1); print string; }' )" = '-' ]; then | ||
set -- rexray start --nopid "$@" | ||
fi | ||
|
||
#set default rexray options | ||
REXRAY_FSTYPE="${REXRAY_FSTYPE:-ext4}" | ||
REXRAY_LOGLEVEL="${REXRAY_LOGLEVEL:-warn}" | ||
REXRAY_PREEMPT="${REXRAY_PREEMPT:-false}" | ||
|
||
if [ "$1" = 'rexray' ]; then | ||
|
||
for rexray_option in \ | ||
fsType \ | ||
loglevel \ | ||
preempt \ | ||
; do | ||
val=$(eval echo "\$REXRAY_$(echo $rexray_option | \ | ||
awk '{print toupper($0)}')") | ||
if [ "$val" ]; then | ||
sed -ri 's/^([\ ]*'"$rexray_option"':).*/\1 '"$val"'/' \ | ||
/etc/rexray/rexray.yml | ||
fi | ||
done | ||
|
||
fi | ||
|
||
exec "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters