Project

General

Profile

« Previous | Next » 

Revision 14854

bugfix: lib/runscripts/util.run: $wrap_fn: this always needs to contain `is_runscript=1` because $is_runscript is not (and cannot be) exported

View differences:

trunk/lib/runscripts/util.run
88 88
#### utils
89 89

  
90 90
# usage: sudo $wrap_fn fn ...
91
wrap_fn="$(esc "$top_script")"
91
wrap_fn="$(esc env is_runscript=1 "$top_script")"
92
	# invoked script must always run as runscript so that wrapped command is run
92 93
	# if sudo to non-root and $top_script not world-executable, produces error
93
# invoked script must always run as runscript so that wrapped command is run
94
if test ! "$is_runscript"; then wrap_fn="env is_runscript=1 $wrap_fn"; fi
95 94

  
96 95
func_override sudo__util_sh
97 96
function sudo() # usage: sudo fn|cmd ... # supports shell functions as well

Also available in: Unified diff