From c6d1af0fd763c117b65defd1f19848c74f83b03b Mon Sep 17 00:00:00 2001 From: Tom Clegg Date: Wed, 13 Jul 2022 15:34:04 -0400 Subject: [PATCH] 17344: Rename "root" subcommand to "sudo". Arvados-DCO-1.1-Signed-off-by: Tom Clegg --- cmd/arvados-client/cmd.go | 2 +- cmd/arvados-client/{root.go => sudo.go} | 6 +++--- doc/install/automatic.html.textile.liquid | 4 ++-- lib/install/init.go | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) rename cmd/arvados-client/{root.go => sudo.go} (88%) diff --git a/cmd/arvados-client/cmd.go b/cmd/arvados-client/cmd.go index 783fb0ca90..c10783c978 100644 --- a/cmd/arvados-client/cmd.go +++ b/cmd/arvados-client/cmd.go @@ -61,7 +61,7 @@ var ( "shell": shellCommand{}, "connect-ssh": connectSSHCommand{}, "diagnostics": diagnostics.Command{}, - "root": rootCommand{}, + "sudo": sudoCommand{}, }) ) diff --git a/cmd/arvados-client/root.go b/cmd/arvados-client/sudo.go similarity index 88% rename from cmd/arvados-client/root.go rename to cmd/arvados-client/sudo.go index 5d9845ce4e..94c2d275d3 100644 --- a/cmd/arvados-client/root.go +++ b/cmd/arvados-client/sudo.go @@ -15,12 +15,12 @@ import ( "git.arvados.org/arvados.git/sdk/go/ctxlog" ) -// rootCommand runs another command using API connection info and +// sudoCommand runs another command using API connection info and // SystemRootToken from the system config file instead of the caller's // environment vars. -type rootCommand struct{} +type sudoCommand struct{} -func (rootCommand) RunCommand(prog string, args []string, stdin io.Reader, stdout, stderr io.Writer) int { +func (sudoCommand) RunCommand(prog string, args []string, stdin io.Reader, stdout, stderr io.Writer) int { ldr := config.NewLoader(stdin, ctxlog.New(stderr, "text", "info")) flags := flag.NewFlagSet(prog, flag.ContinueOnError) ldr.SetupFlags(flags) diff --git a/doc/install/automatic.html.textile.liquid b/doc/install/automatic.html.textile.liquid index 199518ffc6..9923767dd3 100644 --- a/doc/install/automatic.html.textile.liquid +++ b/doc/install/automatic.html.textile.liquid @@ -61,13 +61,13 @@ When the "init" command is finished, navigate to the link shown in the terminal Activate your new Arvados user account.
-# arv root user setup exampleUserName
+# arv sudo user setup exampleUserName
 
Run the diagnostics tool to ensure everything is working.
-# arv root diagnostics
+# arv sudo diagnostics
 
h2. Customize the cluster diff --git a/lib/install/init.go b/lib/install/init.go index 80fa35cc48..a341155ab3 100644 --- a/lib/install/init.go +++ b/lib/install/init.go @@ -374,7 +374,7 @@ func (initcmd *initCommand) RunCommand(prog string, args []string, stdin io.Read err = fmt.Errorf("%v: %w", cmd.Args, err) return 1 } - cmd = exec.CommandContext(ctx, "arv", "root", "keep", "docker", "alpine") + cmd = exec.CommandContext(ctx, "arv", "sudo", "keep", "docker", "alpine") cmd.Stdout = stderr cmd.Stderr = stderr err = cmd.Run() -- 2.30.2