aboutsummaryrefslogtreecommitdiffstats
path: root/c_exec.go
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--c_exec.go24
1 files changed, 12 insertions, 12 deletions
diff --git a/c_exec.go b/c_exec.go
index cdd23f8..b0145f6 100644
--- a/c_exec.go
+++ b/c_exec.go
@@ -39,7 +39,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* hardflip: src/c_exec.go
- * Mon, 18 Dec 2023 13:20:08 +0100
+ * Mon, 18 Dec 2023 15:07:52 +0100
* Joe
*
* exec the command at some point
@@ -54,7 +54,7 @@ import (
"strconv"
)
-func exec_cmd(cmd_fmt []string) {
+func c_exec_cmd(cmd_fmt []string) {
cmd := exec.Command(cmd_fmt[0], cmd_fmt[1:]...)
fmt.Println(cmd_fmt)
@@ -64,7 +64,7 @@ func exec_cmd(cmd_fmt []string) {
cmd.Run()
}
-func format_ssh_jump(host *HostNode) string {
+func c_format_ssh_jump(host *HostNode) string {
jump_fmt := "-oProxyCommand=ssh"
if len(host.JumpPriv) > 0 {
jump_fmt += " -i " + host.JumpPriv
@@ -81,7 +81,7 @@ func format_ssh_jump(host *HostNode) string {
return jump_fmt
}
-func format_ssh(host *HostNode) []string {
+func c_format_ssh(host *HostNode) []string {
cmd_fmt := []string{"ssh"}
user := host.User
@@ -89,7 +89,7 @@ func format_ssh(host *HostNode) []string {
cmd_fmt = append(cmd_fmt, "-i", host.Priv)
}
if len(host.Jump) > 0 {
- cmd_fmt = append(cmd_fmt, format_ssh_jump(host))
+ cmd_fmt = append(cmd_fmt, c_format_ssh_jump(host))
}
if host.Port != 0 {
cmd_fmt = append(cmd_fmt, "-p", strconv.Itoa(int(host.Port)))
@@ -101,24 +101,24 @@ func format_ssh(host *HostNode) []string {
return cmd_fmt
}
-func format_rdp() {
+func c_format_rdp() {
}
-func format_cmd(id uint64, lhost *HostList) {
+func c_format_cmd(id uint64, lhost *HostList) {
host := lhost.head
- var cmd_fmt []string
+ // var cmd_fmt []string
host = lhost.sel(id)
if host == nil {
c_die("host id not found", nil)
}
if host.Type == 0 {
- cmd_fmt = format_ssh(host)
+ // cmd_fmt = format_ssh(host)
}
- exec_cmd(cmd_fmt)
+ // exec_cmd(cmd_fmt)
}
-func display_servers(lhost *HostList) {
+func c_display_servers(lhost *HostList) {
host := lhost.head
if lhost.head == nil {
@@ -130,5 +130,5 @@ func display_servers(lhost *HostList) {
host = host.next
}
fmt.Println()
- format_cmd(2, lhost)
+ c_format_cmd(4, lhost)
}