aboutsummaryrefslogtreecommitdiff
path: root/init_dir.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2016-09-25 15:05:09 +0200
committerJakob Unterwurzacher2016-09-25 16:43:17 +0200
commit2050c7f3b3822a4a3329d4ba5b146d269ef05b4d (patch)
tree69e5639a02498e37fa4f1aa3af6f605f756f42cc /init_dir.go
parentf8da264222f7348c6b9e6dd9d372200f850d2878 (diff)
reverse: add gcmsiv flag and associated tests
Diffstat (limited to 'init_dir.go')
-rw-r--r--init_dir.go16
1 files changed, 11 insertions, 5 deletions
diff --git a/init_dir.go b/init_dir.go
index fac4053..c9c7be6 100644
--- a/init_dir.go
+++ b/init_dir.go
@@ -39,7 +39,7 @@ func initDir(args *argContainer) {
}
password := readpassword.Twice(args.extpass)
creator := tlog.ProgramName + " " + GitVersion
- err = configfile.CreateConfFile(args.config, password, args.plaintextnames, args.scryptn, creator, args.reverse)
+ err = configfile.CreateConfFile(args.config, password, args.plaintextnames, args.scryptn, creator, args.gcmsiv)
if err != nil {
tlog.Fatal.Println(err)
os.Exit(ERREXIT_INIT)
@@ -53,8 +53,14 @@ func initDir(args *argContainer) {
os.Exit(ERREXIT_INIT)
}
}
-
- tlog.Info.Printf(tlog.ColorGreen + "The filesystem has been created successfully." + tlog.ColorReset)
+ mountArgs := ""
+ fsName := "gocryptfs"
+ if args.reverse {
+ mountArgs = " -reverse"
+ fsName = "gocryptfs-reverse"
+ }
+ tlog.Info.Printf(tlog.ColorGreen+"The %s filesystem has been created successfully."+tlog.ColorReset,
+ fsName)
wd, _ := os.Getwd()
friendlyPath, _ := filepath.Rel(wd, args.cipherdir)
if strings.HasPrefix(friendlyPath, "../") {
@@ -62,7 +68,7 @@ func initDir(args *argContainer) {
// keep the absolute path.
friendlyPath = args.cipherdir
}
- tlog.Info.Printf(tlog.ColorGrey+"You can now mount it using: %s %s MOUNTPOINT"+tlog.ColorReset,
- tlog.ProgramName, friendlyPath)
+ tlog.Info.Printf(tlog.ColorGrey+"You can now mount it using: %s%s %s MOUNTPOINT"+tlog.ColorReset,
+ tlog.ProgramName, mountArgs, friendlyPath)
os.Exit(0)
}