introduce site overlays
site overlays are place in sysconfdir/overlays and take precedence over distribution overlays with the same name. Every `wwctl overlay` command changing overlays will create an site overlay. distribution overlays can't be deleted or modified with wwctl. Signed-off-by: Christian Goll <cgoll@suse.com>
This commit is contained in:
@@ -14,7 +14,8 @@ import (
|
||||
Creates '/etc/hosts' from the host template.
|
||||
*/
|
||||
func Hostfile() (err error) {
|
||||
hostTemplate := path.Join(overlay.OverlaySourceDir("host"), "/etc/hosts.ww")
|
||||
overlaySourceDir, _ := overlay.OverlaySourceDir("host")
|
||||
hostTemplate := path.Join(overlaySourceDir, "/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