wip: Add opening /etc/inittab
This commit is contained in:
parent
b5808e7773
commit
945b295bdf
1 changed files with 14 additions and 1 deletions
15
main.go
15
main.go
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue