2017-05-30 17:59:13 +02:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
|
|
|
|
"github.com/rfjakob/gocryptfs/internal/tlog"
|
|
|
|
)
|
|
|
|
|
|
|
|
const tUsage = "" +
|
2017-05-30 19:01:32 +02:00
|
|
|
"Usage: " + tlog.ProgramName + " -init|-passwd|-info [OPTIONS] CIPHERDIR\n" +
|
2017-05-30 17:59:13 +02:00
|
|
|
" or " + tlog.ProgramName + " [OPTIONS] CIPHERDIR MOUNTPOINT\n"
|
|
|
|
|
|
|
|
// helpShort is what gets displayed when passed "-h" or on syntax error.
|
|
|
|
func helpShort() {
|
|
|
|
printVersion()
|
|
|
|
fmt.Printf("\n")
|
|
|
|
fmt.Printf(tUsage)
|
|
|
|
fmt.Printf(`
|
|
|
|
Common Options (use -hh to show all):
|
|
|
|
-aessiv Use AES-SIV encryption (with -init)
|
|
|
|
-allow_other Allow other users to access the mount
|
2018-10-06 21:49:33 +02:00
|
|
|
-i, -idle Unmount automatically after specified idle duration
|
2017-05-30 17:59:13 +02:00
|
|
|
-config Custom path to config file
|
|
|
|
-ctlsock Create control socket at location
|
|
|
|
-extpass Call external program to prompt for the password
|
|
|
|
-fg Stay in the foreground
|
2019-11-03 20:19:22 +01:00
|
|
|
-fsck Check filesystem integrity
|
2017-05-30 17:59:13 +02:00
|
|
|
-fusedebug Debug FUSE calls
|
|
|
|
-h, -help This short help text
|
|
|
|
-hh Long help text with all options
|
|
|
|
-init Initialize encrypted directory
|
2017-05-30 19:01:32 +02:00
|
|
|
-info Display information about encrypted directory
|
2017-05-30 17:59:13 +02:00
|
|
|
-masterkey Mount with explicit master key instead of password
|
|
|
|
-nonempty Allow mounting over non-empty directory
|
|
|
|
-nosyslog Do not redirect log messages to syslog
|
2020-05-17 19:31:04 +02:00
|
|
|
-passfile Read password from plain text file(s)
|
2017-05-30 17:59:13 +02:00
|
|
|
-passwd Change password
|
|
|
|
-plaintextnames Do not encrypt file names (with -init)
|
|
|
|
-q, -quiet Silence informational messages
|
|
|
|
-reverse Enable reverse mode
|
|
|
|
-ro Mount read-only
|
|
|
|
-speed Run crypto speed test
|
|
|
|
-version Print version information
|
|
|
|
-- Stop option parsing
|
|
|
|
`)
|
|
|
|
}
|
|
|
|
|
|
|
|
// helpLong gets only displayed on "-hh"
|
|
|
|
func helpLong() {
|
|
|
|
printVersion()
|
|
|
|
fmt.Printf("\n")
|
|
|
|
fmt.Printf(tUsage)
|
|
|
|
fmt.Printf("\nOptions:\n")
|
|
|
|
flagSet.PrintDefaults()
|
|
|
|
fmt.Printf(" --\n Stop option parsing\n")
|
|
|
|
}
|