-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwinCmd_linux.go
38 lines (33 loc) · 915 Bytes
/
winCmd_linux.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
////////////////////////////////////////////////////////////////////////////
// Porgram: winCmd - Windows specific command handling in dummy linux version
// Authors: Antonio Sun (c) 2015-16, All rights reserved
////////////////////////////////////////////////////////////////////////////
package main
import (
"fmt"
"strings"
)
func rdCmd(options Options) error {
return nil
}
func rebootCmd(options Options) error {
var ret error
progname += "::reboot"
for _, pods := range config.Pod {
for _, inst := range pods.Instance {
if inst.Database == options.Reboot.Instance {
fmt.Printf("%s: Rebooting machines for %s\r\n", progname, inst.Database)
if !options.Reboot.NoDb {
reboot(inst.Dbserver)
}
for _, m := range strings.Fields(inst.Servers) {
reboot(m)
}
}
}
}
return ret
}
func reboot(machine string) {
fmt.Printf("%s: Rebooting %s\r\n", progname, machine)
}