mirror of
https://github.com/rancher/os.git
synced 2025-09-23 03:20:07 +00:00
Merge pull request #1859 from SvenDowideit/fix-dev-version-check
fix ros-install version check for dev builds
This commit is contained in:
@@ -197,27 +197,29 @@ func runInstall(image, installType, cloudConfig, device, partition, statedir, ka
|
|||||||
log.Infof("user specified to install pre v0.8.0: %s", image)
|
log.Infof("user specified to install pre v0.8.0: %s", image)
|
||||||
imageVersion = strings.Replace(imageVersion, "-", ".", -1)
|
imageVersion = strings.Replace(imageVersion, "-", ".", -1)
|
||||||
vArray := strings.Split(imageVersion, ".")
|
vArray := strings.Split(imageVersion, ".")
|
||||||
v, _ := strconv.ParseFloat(vArray[0]+"."+vArray[1], 32)
|
if len(vArray) >= 2 {
|
||||||
if v < 0.8 || imageVersion == "0.8.0-rc1" {
|
v, _ := strconv.ParseFloat(vArray[0]+"."+vArray[1], 32)
|
||||||
log.Infof("starting installer container for %s", image)
|
if v < 0.8 || imageVersion == "0.8.0-rc1" {
|
||||||
if installType == "generic" ||
|
log.Infof("starting installer container for %s", image)
|
||||||
installType == "syslinux" ||
|
if installType == "generic" ||
|
||||||
installType == "gptsyslinux" {
|
installType == "syslinux" ||
|
||||||
cmd := exec.Command("system-docker", "run", "--net=host", "--privileged", "--volumes-from=all-volumes",
|
installType == "gptsyslinux" {
|
||||||
"--entrypoint=/scripts/set-disk-partitions", image, device, diskType)
|
cmd := exec.Command("system-docker", "run", "--net=host", "--privileged", "--volumes-from=all-volumes",
|
||||||
|
"--entrypoint=/scripts/set-disk-partitions", image, device, diskType)
|
||||||
|
cmd.Stdout, cmd.Stderr = os.Stdout, os.Stderr
|
||||||
|
if err := cmd.Run(); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
cmd := exec.Command("system-docker", "run", "--net=host", "--privileged", "--volumes-from=user-volumes",
|
||||||
|
"--volumes-from=command-volumes", image, "-d", device, "-t", installType, "-c", cloudConfig,
|
||||||
|
"-a", kappend)
|
||||||
cmd.Stdout, cmd.Stderr = os.Stdout, os.Stderr
|
cmd.Stdout, cmd.Stderr = os.Stdout, os.Stderr
|
||||||
if err := cmd.Run(); err != nil {
|
if err := cmd.Run(); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
cmd := exec.Command("system-docker", "run", "--net=host", "--privileged", "--volumes-from=user-volumes",
|
|
||||||
"--volumes-from=command-volumes", image, "-d", device, "-t", installType, "-c", cloudConfig,
|
|
||||||
"-a", kappend)
|
|
||||||
cmd.Stdout, cmd.Stderr = os.Stdout, os.Stderr
|
|
||||||
if err := cmd.Run(); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -159,7 +159,8 @@ fi
|
|||||||
|
|
||||||
if [ "$BOOT_PXE" == "1" ]; then
|
if [ "$BOOT_PXE" == "1" ]; then
|
||||||
set -ex
|
set -ex
|
||||||
sudo pixiecore boot \
|
PIXIECORE=$(which pixiecore)
|
||||||
|
sudo -E $PIXIECORE boot \
|
||||||
"${KERNEL}" \
|
"${KERNEL}" \
|
||||||
"${INITRD}" \
|
"${INITRD}" \
|
||||||
--cmdline="${KERNEL_ARGS}"
|
--cmdline="${KERNEL_ARGS}"
|
||||||
|
Reference in New Issue
Block a user