diff options
Diffstat (limited to '')
-rw-r--r-- | c_init.go | 9 | ||||
-rw-r--r-- | c_josh.go | 3 |
2 files changed, 10 insertions, 2 deletions
@@ -39,7 +39,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * josh: src/c_init.go - * Thu, 14 Dec 2023 16:55:35 +0100 + * Thu, 14 Dec 2023 19:21:22 +0100 * Joe * * init functions @@ -92,8 +92,13 @@ func c_read_yaml_file(file string) { if err = yaml.Unmarshal(yaml_file, &host); err != nil { c_die("error reading yaml file " + file, err) } + if len(host.User) == 0 { + host.User = "root" + } + if host.Port == 0 { + host.Port = 22 + } fmt.Println(host) - os.Exit(0) } // This function recurses into the specified root directory in order to load @@ -58,6 +58,9 @@ type host struct { Host string `yaml:"host"` Port uint16 `yaml:"port"` User string `yaml:"user"` + Pass string `yaml:"pass"` + Jump string `yaml:"jump"` + Priv string `yaml:"priv"` } func main() { |