From 5407c7ad7d84e23228cc34ead496d99f79796a74 Mon Sep 17 00:00:00 2001 From: Matt Burchett Date: Wed, 5 Dec 2018 17:07:17 -0600 Subject: [PATCH 1/2] Adding the ability to disable Jump support --- config.json | 1 + pkg/config/config.go | 1 + pkg/shell/shell.go | 8 +++++++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/config.json b/config.json index 6d5f5a2..a3289d9 100644 --- a/config.json +++ b/config.json @@ -3,6 +3,7 @@ "resolverPort": 53, "domains": [ "kc.linuxrocker.com"], "jumpHost": "jump01.kc.linuxrocker.com", + "useJump": false, "splitString": ".linuxrocker", "windowsGeometry": "1600x900" } \ No newline at end of file diff --git a/pkg/config/config.go b/pkg/config/config.go index 44e5f00..df20708 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -13,6 +13,7 @@ type Config struct { ResolverPort int `json:"resolverPort"` Domains []string `json:"domains"` JumpHost string `json:"jumpHost"` + UseJump bool `json:"useJump"` SplitString string `json:"splitString"` WindowsGeometry string `json:"windowsGeometry"` } diff --git a/pkg/shell/shell.go b/pkg/shell/shell.go index ff86dc2..4ac29cf 100644 --- a/pkg/shell/shell.go +++ b/pkg/shell/shell.go @@ -13,6 +13,8 @@ func CreateShellAliases(data []string, username string, config config.Config) { hostname := splitStrings[0] txt := splitStrings[2] + useJump := config.UseJump + jump := config.JumpHost stringSplit := config.SplitString @@ -61,6 +63,10 @@ func CreateShellAliases(data []string, username string, config config.Config) { } } - fmt.Printf("alias %v=\\'%v%v%v %v@%v \"%v %v %v %v %v\"'\n", host, message, prerac, hop, username, jump, rac, racOpts, remoteUser, fqdn, sudo) + if useJump { + fmt.Printf("alias %v=\\'%v%v%v %v@%v \"%v %v %v %v %v\"'\n", host, message, prerac, hop, username, jump, rac, racOpts, remoteUser, fqdn, sudo) + } else { + fmt.Printf("alias %v=\\'%v %v %v %v %v %v\n", host, message, rac, racOpts, remoteUser, fqdn, sudo) + } } } -- 2.45.2 From dbb80959b7bb044b3905214bd49aee867248ffda Mon Sep 17 00:00:00 2001 From: Matt Burchett Date: Wed, 5 Dec 2018 17:08:38 -0600 Subject: [PATCH 2/2] Fixing README --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 0afe517..2ea776f 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ You will need to create a config.json with your information in it: "resolverPort": 53, "domains": [ "kc.linuxrocker.com"], "jumpHost": "jump01.kc.linuxrocker.com", + "useJump": false, "splitString": ".linuxrocker", "windowsGeometry": "1600x900" } -- 2.45.2