diff options
author | Joe <rbo@gmx.us> | 2023-12-14 20:20:20 +0100 |
---|---|---|
committer | Joe <rbo@gmx.us> | 2023-12-14 20:20:20 +0100 |
commit | b9f95a4aa8160fc48de6bf8bbd9cebb927bd3d25 (patch) | |
tree | e00248d5f0339fab6463143ced7c66489c71b0f7 /c_init.go | |
parent | up (diff) | |
download | hardflip-b9f95a4aa8160fc48de6bf8bbd9cebb927bd3d25.tar.gz hardflip-b9f95a4aa8160fc48de6bf8bbd9cebb927bd3d25.tar.bz2 hardflip-b9f95a4aa8160fc48de6bf8bbd9cebb927bd3d25.tar.xz hardflip-b9f95a4aa8160fc48de6bf8bbd9cebb927bd3d25.tar.zst hardflip-b9f95a4aa8160fc48de6bf8bbd9cebb927bd3d25.zip |
print
Diffstat (limited to 'c_init.go')
-rw-r--r-- | c_init.go | 9 |
1 files changed, 7 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 |