commands

package
v0.0.0-...-5918e99 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 1, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package commands provides utilities for executing commands within libosdev

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddGroup

func AddGroup(root, groupName string, groupID int) error

AddGroup will chroot into the given root and add a group

func AddSystemUser

func AddSystemUser(root, userName, gecos, home, shell string, uid, gid int) error

AddSystemUser will chroot into the given root and add a system user

func AddUser

func AddUser(root, userName, gecos, home, shell string, uid, gid int) error

AddUser will chroot into the given root and add a user

func ChrootExec

func ChrootExec(dir, command string) error

ChrootExec will run a given command in the chroot directory

func ExecStdoutArgs

func ExecStdoutArgs(command string, args []string) error

ExecStdoutArgs is a convenience function to execute a command on stdout with the given arguments

func ExecStdoutArgsDir

func ExecStdoutArgsDir(dir string, command string, args []string) error

ExecStdoutArgsDir is a convenience function to execute a command on stdout with the given arguments, in the given working directory

func SetStderr

func SetStderr(w io.Writer)

SetStderr will override the stderr writer used in the exec commands

func SetStdin

func SetStdin(r io.Reader)

SetStdin will override the stdin reader used in the exec commands

func SetStdout

func SetStdout(w io.Writer)

SetStdout will override the stdout writer used in the exec commands

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL