remove type command
The posix equivalent of the type command is "command -v", so now we use that. Thanks to Jonathan Callen <jcallen@gentoo.org> for informing me wrt the fix.
This commit is contained in:
		| @@ -6,7 +6,7 @@ | ||||
| [ -x "${RC_SVCNAME}"-down.sh ] && "${RC_SVCNAME}"-down.sh | ||||
|  | ||||
| # Restore resolv.conf to how it was | ||||
| if type resolvconf >/dev/null 2>&1; then | ||||
| if command -v resolvconf >/dev/null 2>&1; then | ||||
| 	resolvconf -d "${dev}" | ||||
| elif [ -e /etc/resolv.conf-"${dev}".sv ]; then | ||||
| 	# Important that we copy instead of move incase resolv.conf is | ||||
|   | ||||
| @@ -45,7 +45,7 @@ if [ -n "${NS}" ]; then | ||||
| 		DNS="${DNS}domain ${DOMAIN}\n" | ||||
| 	fi | ||||
| 	DNS="${DNS}${NS}" | ||||
| 	if type resolvconf >/dev/null 2>&1; then | ||||
| 	if command -v resolvconf >/dev/null 2>&1; then | ||||
| 		printf "${DNS}" | resolvconf -a "${dev}" | ||||
| 	else | ||||
| 		# Preserve the existing resolv.conf | ||||
|   | ||||
		Reference in New Issue
	
	Block a user