Add an Overlay type with helper methods
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
committed by
Christian Goll
parent
7d4b7ab432
commit
c03dc9436b
@@ -14,8 +14,8 @@ import (
|
||||
Creates '/etc/hosts' from the host template.
|
||||
*/
|
||||
func Hostfile() (err error) {
|
||||
overlaySourceDir, _ := overlay.GetOverlay("host")
|
||||
hostTemplate := path.Join(overlaySourceDir, "/etc/hosts.ww")
|
||||
overlay_ := overlay.GetOverlay("host")
|
||||
hostTemplate := path.Join(overlay_.Rootfs(), "/etc/hosts.ww")
|
||||
if !(util.IsFile(hostTemplate)) {
|
||||
return fmt.Errorf("'the overlay template '/etc/hosts.ww' does not exists in 'host' overlay")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user