Merge pull request #1783 from anderbubble/ubuntu-dracut-initrd
Add support for ubuntu-style dracut image names
This commit is contained in:
@@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
|
||||
## v4.6.0, unreleased
|
||||
|
||||
### Added
|
||||
|
||||
- Support Ubuntu-style dracut initrd images.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix nightly builds.
|
||||
|
||||
@@ -14,6 +14,7 @@ var (
|
||||
initramfsSearchPaths = []string{
|
||||
"/boot/initramfs-*",
|
||||
"/boot/initrd-*",
|
||||
"/boot/initrd.img-*",
|
||||
}
|
||||
|
||||
versionPattern *regexp.Regexp
|
||||
|
||||
@@ -20,7 +20,6 @@ func TestFindInitramfs(t *testing.T) {
|
||||
assert.NoError(t, os.MkdirAll(filepath.Join(RootFsDir("image"), "boot"), 0700))
|
||||
|
||||
tests := map[string]struct {
|
||||
name string
|
||||
initramfs []string
|
||||
ver string
|
||||
path string
|
||||
@@ -45,6 +44,11 @@ func TestFindInitramfs(t *testing.T) {
|
||||
ver: "1.1.1",
|
||||
path: "/boot/initrd-1.1.1.aarch64.img",
|
||||
},
|
||||
"ok case 5 (ubuntu)": {
|
||||
initramfs: []string{"/boot/initrd.img-6.11.0-18-generic"},
|
||||
ver: "6.11.0-18",
|
||||
path: "/boot/initrd.img-6.11.0-18-generic",
|
||||
},
|
||||
"prefix match": {
|
||||
initramfs: []string{"/boot/initrd-1.1.1.aarch64.img"},
|
||||
ver: "1.1",
|
||||
|
||||
Reference in New Issue
Block a user