summaryrefslogtreecommitdiffstats
path: root/net/pbr/tests/mocks/bin/readlink
blob: 50e6ebf69be4aa54b25fb100af264cc16eae6053 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/bash
# Mock readlink for pbr tests
# Returns /usr/libexec/ip-full for /sbin/ip to pass the ip-full check
case "$*" in
	*/sbin/ip)
		echo "/usr/libexec/ip-full"
		;;
	*)
		command readlink "$@" 2>/dev/null || echo "$1"
		;;
esac