2
0
mirror of https://github.com/linka-cloud/d2vm.git synced 2024-11-05 08:16:23 +00:00

kali linux

This commit is contained in:
Neosb 2022-09-18 23:02:25 +02:00 committed by Adphi
parent 6ac85912c1
commit c66595115f
4 changed files with 14 additions and 0 deletions

View File

@ -96,6 +96,8 @@ func sysconfig(osRelease OSRelease) (string, error) {
return syslinuxCfgUbuntu, nil return syslinuxCfgUbuntu, nil
case ReleaseDebian: case ReleaseDebian:
return syslinuxCfgDebian, nil return syslinuxCfgDebian, nil
case ReleaseKali:
return syslinuxCfgDebian, nil
case ReleaseAlpine: case ReleaseAlpine:
return syslinuxCfgAlpine, nil return syslinuxCfgAlpine, nil
case ReleaseCentOS: case ReleaseCentOS:

View File

@ -115,6 +115,12 @@ func TestSyslinuxCfg(t *testing.T) {
initrd: "/initrd.img", initrd: "/initrd.img",
sysconfig: syslinuxCfgDebian, sysconfig: syslinuxCfgDebian,
}, },
{
image: "kalilinux/kali-rolling:latest",
kernel: "/vmlinuz",
initrd: "/initrd.img",
sysconfig: syslinuxCfgDebian,
},
{ {
image: "alpine", image: "alpine",
kernel: "/boot/vmlinuz-virt", kernel: "/boot/vmlinuz-virt",

View File

@ -78,6 +78,9 @@ func NewDockerfile(release OSRelease, img, password string, networkManager Netwo
case ReleaseDebian: case ReleaseDebian:
d.tmpl = debianDockerfileTemplate d.tmpl = debianDockerfileTemplate
net = NetworkManagerIfupdown2 net = NetworkManagerIfupdown2
case ReleaseKali:
d.tmpl = debianDockerfileTemplate
net = NetworkManagerIfupdown2
case ReleaseUbuntu: case ReleaseUbuntu:
d.tmpl = ubuntuDockerfileTemplate d.tmpl = ubuntuDockerfileTemplate
net = NetworkManagerNetplan net = NetworkManagerNetplan

View File

@ -34,6 +34,7 @@ const (
ReleaseAlpine Release = "alpine" ReleaseAlpine Release = "alpine"
ReleaseCentOS Release = "centos" ReleaseCentOS Release = "centos"
ReleaseRHEL Release = "rhel" ReleaseRHEL Release = "rhel"
ReleaseKali Release = "kali"
) )
type Release string type Release string
@ -44,6 +45,8 @@ func (r Release) Supported() bool {
return true return true
case ReleaseDebian: case ReleaseDebian:
return true return true
case ReleaseKali:
return true
case ReleaseAlpine: case ReleaseAlpine:
return true return true
case ReleaseCentOS: case ReleaseCentOS: