Merge pull request #1698 from anderbubble/overlay-create-root-dir
Create site overlay directory
This commit is contained in:
@@ -14,9 +14,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
### Changed
|
||||
|
||||
- `wwctl node list <--yaml|--json>` outputs a map keyed by node name. #1667
|
||||
|
||||
### Changes
|
||||
|
||||
- Don't mount /run during wwinit. #1566
|
||||
|
||||
### Fixed
|
||||
@@ -33,6 +30,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
- Don't attempt to back-up an output file that doesn't exist during upgrade. #1671
|
||||
- Specify init=/init when booting with Grub+dracut. #1573
|
||||
- Fix a warewulfd panic when no kernel fields are specified. #1689
|
||||
- Create site overlay directory. #1690
|
||||
|
||||
## v4.6.0rc1, 2025-01-29
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/containers/storage/drivers/copy"
|
||||
@@ -67,6 +68,11 @@ func (overlay Overlay) CloneSiteOverlay() (siteOverlay Overlay, err error) {
|
||||
if siteOverlay.Exists() {
|
||||
return siteOverlay, fmt.Errorf("site overlay already exists: %s", siteOverlay.Name())
|
||||
}
|
||||
if !util.IsDir(filepath.Dir(overlay.Path())) {
|
||||
if err := os.MkdirAll(filepath.Dir(overlay.Path()), 0755); err != nil {
|
||||
return siteOverlay, err
|
||||
}
|
||||
}
|
||||
err = copy.DirCopy(overlay.Path(), siteOverlay.Path(), copy.Content, true)
|
||||
return siteOverlay, err
|
||||
}
|
||||
|
||||
@@ -190,6 +190,7 @@ getent group %{wwgroup} >/dev/null || groupadd -r %{wwgroup}
|
||||
|
||||
%dir %{_sharedstatedir}/warewulf
|
||||
%dir %{_sharedstatedir}/warewulf/chroots
|
||||
%dir %{_sharedstatedir}/warewulf/overlays
|
||||
%dir %{_datadir}/warewulf/overlays
|
||||
%dir %{_datadir}/warewulf/overlays/*
|
||||
%dir %{_datadir}/warewulf/overlays/*/rootfs
|
||||
|
||||
Reference in New Issue
Block a user