func main() {
	// When we run under the device manager, no environment is set up.
	// We want to have some kind of path.
	if os.Getenv("PATH") == "" {
		os.Setenv("PATH", "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin")
		os.Setenv("HOME", "/home/testuser1")
	}

	cmdline.Main(root)
}
Exemple #2
0
func main() {
	cmdSendKey.Flags.DurationVar(&flagSendKeyExpiry, "for", 0, "Duration of key validity (zero implies no expiration)")
	cmdline.HideGlobalFlagsExcept()
	root := &cmdline.Command{
		Name:  "lock",
		Short: "claim and manage locks",
		Long: `
Command lock claims and manages lock devices.
`,
		Children: []*cmdline.Command{cmdScan, cmdUsers, cmdClaim, cmdLock, cmdUnlock, cmdStatus, cmdListKeys, cmdRecvKey, cmdSendKey},
	}
	cmdline.Main(root)
}
Exemple #3
0
func main() {
	cmdline.Main(cmdRoot)
}
Exemple #4
0
func Main(name string) {
	CommandLineDriver.Name = name
	cmdline.Main(CommandLineDriver)
}
Exemple #5
0
func main() {
	cmdRoot.Flags.StringVar(&configDir, "config-dir", "", "Directory where the lock configuration files are stored. It will be created if it does not exist.")
	cmdline.HideGlobalFlagsExcept()
	cmdline.Main(cmdRoot)
}
Exemple #6
0
func main() {
	profilesmanager.Register(example.New("i2", "eg"))
	profilescmdline.RegisterManagementCommands(commandLineDriver, true, "i2", jiri.ProfilesDBDir, jiri.ProfilesRootDir)
	tool.InitializeRunFlags(&commandLineDriver.Flags)
	cmdline.Main(commandLineDriver)
}
func main() {
	stream = root.Flags.Bool("stream", true,
		"If true stream the data instead of sending the URL.")

	cmdline.Main(root)
}