mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-23 11:00:25 +00:00
diagnostics: dump the master branch of the database
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
This commit is contained in:
parent
218e9de40c
commit
1fa702886b
@ -6,8 +6,10 @@ import (
|
||||
"io"
|
||||
"log"
|
||||
"net"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
@ -103,6 +105,15 @@ func capture(w *tar.Writer) {
|
||||
run(t, w, "/bin/cp", "/etc/resolv.conf", ".")
|
||||
run(t, w, "/usr/bin/dig", "docker.com")
|
||||
run(t, w, "/usr/bin/wget", "-O", "-", "http://www.docker.com/")
|
||||
|
||||
// Dump the database
|
||||
dbBase := "/Database/branch/master/ro"
|
||||
filepath.Walk(dbBase, func(path string, f os.FileInfo, err error) error {
|
||||
if f.Mode().IsRegular() {
|
||||
run(t, w, "/bin/cat", path)
|
||||
}
|
||||
return nil
|
||||
})
|
||||
}
|
||||
|
||||
func main() {
|
||||
|
Loading…
Reference in New Issue
Block a user