17344: Rename "root" subcommand to "sudo".
authorTom Clegg <tom@curii.com>
Wed, 13 Jul 2022 19:34:04 +0000 (15:34 -0400)
committerTom Clegg <tom@curii.com>
Thu, 14 Jul 2022 13:21:42 +0000 (09:21 -0400)
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom@curii.com>

cmd/arvados-client/cmd.go
cmd/arvados-client/sudo.go [moved from cmd/arvados-client/root.go with 88% similarity]
doc/install/automatic.html.textile.liquid
lib/install/init.go

index 783fb0ca90b89d2fb84ca4e12ab9cd693e04ff3e..c10783c978be6c48e6f7aea0c9ad1a959303b656 100644 (file)
@@ -61,7 +61,7 @@ var (
                "shell":                shellCommand{},
                "connect-ssh":          connectSSHCommand{},
                "diagnostics":          diagnostics.Command{},
-               "root":                 rootCommand{},
+               "sudo":                 sudoCommand{},
        })
 )
 
similarity index 88%
rename from cmd/arvados-client/root.go
rename to cmd/arvados-client/sudo.go
index 5d9845ce4ecc7ddb316e8f0f22716fabce177a4e..94c2d275d34df9decae567aeddb0da5d554fff91 100644 (file)
@@ -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)
index 199518ffc6a64ef6734db8e4445d0d3e39b731d1..9923767dd347410aef5b037fe8165469f76860bc 100644 (file)
@@ -61,13 +61,13 @@ When the "init" command is finished, navigate to the link shown in the terminal
 Activate your new Arvados user account.
 
 <pre>
-# arv root user setup exampleUserName
+# arv sudo user setup exampleUserName
 </pre>
 
 Run the diagnostics tool to ensure everything is working.
 
 <pre>
-# arv root diagnostics
+# arv sudo diagnostics
 </pre>
 
 h2. Customize the cluster
index 80fa35cc48c82e0e685fd3c5b166366b3afa8747..a341155ab3552858cb0675706832ccf25188dea0 100644 (file)
@@ -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()