Documentation
¶
Overview ¶
Package toolenv is how host tools are found and run when Stratum runs them as root: iptables and tc load code from XTABLES_LIBDIR and TC_LIB_DIR, and a shim of any tool can sit first on the caller's PATH, so neither the caller's environment nor its PATH is used.
Index ¶
Constants ¶
const Path = "/usr/sbin:/usr/bin:/sbin:/bin"
Path is where those tools are looked for and what they see as PATH.
Variables ¶
This section is empty.
Functions ¶
func Cmd ¶
Cmd is exec.Command with name looked up in path, not on the caller's PATH, and Env as the environment. A name with a slash is used as given. The command is built from the resolved path: exec looks a bare name up on the caller's PATH as soon as it is given one. A name not in path leaves a path with a slash, so exec does not look it up elsewhere, and exec.ErrNotFound, which is also what the command then fails with.
Types ¶
This section is empty.