github.com/wlan0/docker@v1.5.0/pkg/systemd/booted.go (about) 1 package systemd 2 3 import ( 4 "os" 5 ) 6 7 // Conversion to Go of systemd's sd_booted() 8 func SdBooted() bool { 9 s, err := os.Stat("/run/systemd/system") 10 if err != nil { 11 return false 12 } 13 14 return s.IsDir() 15 }