bbmain

package
v7.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2020 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package bbmain is the package imported by all rewritten busybox command-packages to register themselves.

Index

Constants

This section is empty.

Variables

View Source
var ErrNotRegistered = errors.New("command not registered")

ErrNotRegistered is returned by Run if the given command is not registered.

View Source
var Noop = func() {}

Noop is a noop function.

Functions

func ListCmds

func ListCmds()

ListCmds lists bb commands and verifies symlinks. It is by convention called when the bb command is invoked directly. For every command, there should be a symlink in /bbin, and for every symlink, there should be a command. Occasionally, we have bugs that result in one of these being false. Just running bb is an easy way to tell if something in your image is messed up.

func Register

func Register(name string, init, main func())

Register registers an init and main function for name.

func RegisterDefault

func RegisterDefault(init, main func())

RegisterDefault registers a default init and main function.

func Run

func Run(name string) error

Run runs the command with the given name.

If the command's main exits without calling os.Exit, Run will exit with exit code 0.

Types

This section is empty.

Directories

Path Synopsis
Package main is the busybox main.go template.
Package main is the busybox main.go template.

Jump to

Keyboard shortcuts

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