gopkg.in/hugelgupf/u-root.v4@v4.0.0-20180831060141-1d761fb73d50/cmds/sos/sos.go (about)

     1  // Copyright 2018 the u-root Authors. All rights reserved
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package main
     6  
     7  import (
     8  	"flag"
     9  	"log"
    10  	"os/exec"
    11  
    12  	"github.com/u-root/u-root/pkg/sos"
    13  )
    14  
    15  var htmlRoot = flag.String("html", "/etc/sos/html", "Path for root of SOS html files")
    16  
    17  func main() {
    18  	if o, err := exec.Command("ip", "link", "set", "dev", "lo", "up").CombinedOutput(); err != nil {
    19  		log.Fatalf("ip link set dev lo: %v (%v)", string(o), err)
    20  	}
    21  	sos.StartServer(sos.NewSosService())
    22  }