wip: Add opening /etc/inittab

This commit is contained in:
ptrcnull 2021-11-29 22:12:52 +01:00
parent b5808e7773
commit 945b295bdf

15
main.go
View file

@ -1,5 +1,18 @@
package main
import (
"fmt"
"os"
)
func main() {
inittab := DefaultInitTab
if file, err := os.OpenFile("/etc/inittab", os.O_RDONLY, 0644); err != nil {
inittab = ParseInitTab(file)
err := file.Close()
if err != nil {
fmt.Println("close inittab:", err)
}
}
}