mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2024-11-22 08:18:32 +00:00
Move create-dev-char-symlinks subcommand from hook to system
Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
parent
962d38e9dd
commit
8188400c97
@ -18,7 +18,7 @@ package hook
|
||||
|
||||
import (
|
||||
chmod "github.com/NVIDIA/nvidia-container-toolkit/cmd/nvidia-ctk/hook/chmod"
|
||||
devchar "github.com/NVIDIA/nvidia-container-toolkit/cmd/nvidia-ctk/hook/create-dev-char-symlinks"
|
||||
|
||||
symlinks "github.com/NVIDIA/nvidia-container-toolkit/cmd/nvidia-ctk/hook/create-symlinks"
|
||||
ldcache "github.com/NVIDIA/nvidia-container-toolkit/cmd/nvidia-ctk/hook/update-ldcache"
|
||||
"github.com/sirupsen/logrus"
|
||||
@ -49,7 +49,6 @@ func (m hookCommand) build() *cli.Command {
|
||||
ldcache.NewCommand(m.logger),
|
||||
symlinks.NewCommand(m.logger),
|
||||
chmod.NewCommand(m.logger),
|
||||
devchar.NewCommand(m.logger),
|
||||
}
|
||||
|
||||
return &hook
|
||||
|
@ -45,7 +45,7 @@ type config struct {
|
||||
createAll bool
|
||||
}
|
||||
|
||||
// NewCommand constructs a hook sub-command with the specified logger
|
||||
// NewCommand constructs a command sub-command with the specified logger
|
||||
func NewCommand(logger *logrus.Logger) *cli.Command {
|
||||
c := command{
|
||||
logger: logger,
|
||||
@ -60,7 +60,7 @@ func (m command) build() *cli.Command {
|
||||
// Create the 'create-dev-char-symlinks' command
|
||||
c := cli.Command{
|
||||
Name: "create-dev-char-symlinks",
|
||||
Usage: "A hook to create symlinks to possible /dev/nv* devices in /dev/char",
|
||||
Usage: "A utility to create symlinks to possible /dev/nv* devices in /dev/char",
|
||||
Before: func(c *cli.Context) error {
|
||||
return m.validateFlags(c, &cfg)
|
||||
},
|
@ -17,7 +17,7 @@
|
||||
package system
|
||||
|
||||
import (
|
||||
"github.com/NVIDIA/nvidia-container-toolkit/cmd/nvidia-ctk/runtime/configure"
|
||||
devchar "github.com/NVIDIA/nvidia-container-toolkit/cmd/nvidia-ctk/system/create-dev-char-symlinks"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
@ -42,7 +42,7 @@ func (m command) build() *cli.Command {
|
||||
}
|
||||
|
||||
system.Subcommands = []*cli.Command{
|
||||
configure.NewCommand(m.logger),
|
||||
devchar.NewCommand(m.logger),
|
||||
}
|
||||
|
||||
return &system
|
||||
|
Loading…
Reference in New Issue
Block a user