[lxd] remove CheckInit

This commit is contained in:
Chris Lundquist 2016-05-31 01:43:40 +00:00 committed by Megan Marsh
parent 8326d7b6ac
commit 607da30547
1 changed files with 0 additions and 30 deletions

View File

@ -4,12 +4,10 @@ import (
"fmt"
"github.com/mitchellh/packer/packer"
"io"
"io/ioutil"
"log"
"os"
"os/exec"
"path/filepath"
"strings"
"syscall"
)
@ -140,31 +138,3 @@ func (c *Communicator) Execute(commandString string) (*exec.Cmd, error) {
return localCmd, nil
}
func (c *Communicator) CheckInit() (string, error) {
log.Printf("Debug runlevel exec")
localCmd, err := c.Execute("/sbin/runlevel")
if err != nil {
return "", err
}
pr, _ := localCmd.StdoutPipe()
if err = localCmd.Start(); err != nil {
return "", err
}
output, err := ioutil.ReadAll(pr)
if err != nil {
return "", err
}
err = localCmd.Wait()
if err != nil {
return "", err
}
return strings.TrimSpace(string(output)), nil
}