main: return 0 if deviceinfo is missing
It might be missing if the device package is installed after mkinitfs is being called, so don't cause apk triggers to error out by returning failure.
This commit is contained in:
8
main.go
8
main.go
@@ -26,7 +26,13 @@ func timeFunc(start time.Time, name string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
devinfo := deviceinfo.ReadDeviceinfo()
|
devinfo, err := deviceinfo.ReadDeviceinfo()
|
||||||
|
if err != nil {
|
||||||
|
log.Print("NOTE: deviceinfo (from device package) not installed yet, " +
|
||||||
|
"not building the initramfs now (it should get built later " +
|
||||||
|
"automatically.)")
|
||||||
|
os.Exit(0)
|
||||||
|
}
|
||||||
|
|
||||||
var outDir string
|
var outDir string
|
||||||
getopt.StringVar(&outDir, "d", "/boot", "Directory to output initfs(-extra), default: /boot")
|
getopt.StringVar(&outDir, "d", "/boot", "Directory to output initfs(-extra), default: /boot")
|
||||||
|
Reference in New Issue
Block a user