mirror of
https://github.com/SynologyOpenSource/synology-csi.git
synced 2026-02-13 21:00:03 +00:00
12 lines
385 B
Bash
Executable File
12 lines
385 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# This script is only used in the container, see Dockerfile.
|
|
|
|
DIR="/host" # csi-node mount / of the node to /host in the container
|
|
BIN="$(basename "$0")"
|
|
|
|
if [ -d "$DIR" ]; then
|
|
exec chroot $DIR /usr/bin/env -i PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" "$BIN" "$@"
|
|
fi
|
|
|
|
echo -n "Couldn't find hostPath: $DIR in the CSI container"
|
|
exit 1 |