Merge pull request #114 from gmkurtzer/overlay_chown

Added overlay chown subcommand
This commit is contained in:
Gregory M. Kurtzer
2021-09-08 16:11:53 -07:00
committed by GitHub
6 changed files with 130 additions and 4 deletions

View File

@@ -16,9 +16,9 @@ import (
func CobraRunE(cmd *cobra.Command, args []string) error {
var overlaySourceDir string
overlayName := args[0]
fileName := args[2]
fileName := args[1]
permissionMode, err := strconv.ParseInt(args[1], 8, 32)
permissionMode, err := strconv.ParseInt(args[2], 8, 32)
if err != nil {
wwlog.Printf(wwlog.ERROR, "Could not convert requested mode: %s\n", err)
os.Exit(1)

View File

@@ -4,7 +4,7 @@ import "github.com/spf13/cobra"
var (
baseCmd = &cobra.Command{
Use: "chmod [flags] <overlay> <mode> <path>",
Use: "chmod [flags] <overlay> <path> <mode>",
Short: "Change file permissions within an overlay",
Long: "This command will allow you to change the permissions of a file within an\n" +
"overlay.",