1. Henk Langeveld
  2. oi-build

Commits

Henk Langeveld  committed 669fe53

Split an overambitious shell pattern into two separate tests

Don't mix shell patterns with variables in the right hand side of [[ ... == ... ]]

  • Participants
  • Parent commits 5145cc6
  • Branches default

Comments (0)

Files changed (1)

File setup-pkg-experimental

View file
 	case ${targetzone} in
 	(global)	print -u2 WARNING: building in the global zone carries risk.
 	esac
-	[[ $(zonename) == *(${targetzone}|global) ]] && return
+	[[ $(zonename) == ${targetzone} ]] && return
+	[[ $(zonename) == global ]] && return
 	zoneadm -z $targetzone list | read && return
 	print -u2 targetzone should match current zone name, or a zone within the current global
 	exit 1