cvs commit: ports/Mk bsd.commands.mk
Anonymous
swell.k at gmail.com
Mon Nov 8 05:27:04 UTC 2010
Max Khon <fjoe at FreeBSD.org> writes:
> fjoe 2010-11-08 04:47:44 UTC
>
> FreeBSD ports repository
>
> Modified files:
> Mk bsd.commands.mk
> Log:
> Document how to use "sudo" instead of "su" in SU_CMD.
It partially supports yet another usage
SU_CMD = eval sudo -E # see also ports/146816
That doesn't prepend sh(1) in COMMAND unlike su(1).
Note, `-E' is important. sudo(8) unlike su(1) resets environment by
default unless one adds !env_reset to etc/sudoers.
$ FOO=foo sudo sh -c 'echo $FOO'
$ FOO=foo su root -c 'echo $FOO'
foo
More information about the cvs-ports
mailing list