Add support for hook files in the initramfs-extra archive (MR 19)
This allows defining lists of files in /etc/postmarketos-mkinitfs/files-extra, which are slurped into the initramfs-extra archive. fixes #11
This commit is contained in:
11
main.go
11
main.go
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2021 Clayton Craft <clayton@craftyguy.net>
|
// Copyright 2022 Clayton Craft <clayton@craftyguy.net>
|
||||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
package main
|
package main
|
||||||
@@ -429,6 +429,15 @@ func getInitfsExtraFiles(files misc.StringSet, devinfo deviceinfo.DeviceInfo) er
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Hook files & scripts
|
||||||
|
if exists("/etc/postmarketos-mkinitfs/files-extra") {
|
||||||
|
log.Println("- Including hook files")
|
||||||
|
hookFiles := getHookFiles("/etc/postmarketos-mkinitfs/files-extra")
|
||||||
|
if err := getFiles(files, hookFiles, true); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if exists("/usr/bin/osk-sdl") {
|
if exists("/usr/bin/osk-sdl") {
|
||||||
log.Println("- Including FDE support")
|
log.Println("- Including FDE support")
|
||||||
if err := getFdeFiles(files, devinfo); err != nil {
|
if err := getFdeFiles(files, devinfo); err != nil {
|
||||||
|
Reference in New Issue
Block a user