diff --git a/Dockerfile.dapper b/Dockerfile.dapper index fe407032..b188a410 100644 --- a/Dockerfile.dapper +++ b/Dockerfile.dapper @@ -73,6 +73,7 @@ ARG OS_SERVICES_REPO=https://raw.githubusercontent.com/${OS_REPO}/os-services ARG IMAGE_NAME=${OS_REPO}/os ARG OS_CONSOLE=default +ARG OS_AUTOFORMAT=false ARG OS_BASE_URL_amd64=https://github.com/rancher/os-base/releases/download/v2018.02.7-4/os-base_amd64.tar.xz ARG OS_BASE_URL_arm64=https://github.com/rancher/os-base/releases/download/v2018.02.7-4/os-base_arm64.tar.xz @@ -87,7 +88,6 @@ ARG SYSTEM_DOCKER_URL_arm64=https://github.com/rancher/os-system-docker/releases ARG USER_DOCKER_VERSION=18.06.1 ARG USER_DOCKER_ENGINE_VERSION=docker-${USER_DOCKER_VERSION}-ce -ARG VMWARE_AUTOFORMAT=1 ARG AZURE_SERVICE=false ###################################################### @@ -120,6 +120,7 @@ ENV BUILD_DOCKER_URL=BUILD_DOCKER_URL_${ARCH} \ OS_REPO=${OS_REPO} \ OS_SERVICES_REPO=${OS_SERVICES_REPO} \ OS_CONSOLE=${OS_CONSOLE} \ + OS_AUTOFORMAT=${OS_AUTOFORMAT} \ REPO_VERSION=master \ SELINUX_POLICY_URL=${SELINUX_POLICY_URL} \ SYSTEM_DOCKER_URL=SYSTEM_DOCKER_URL_${ARCH} \ @@ -127,7 +128,6 @@ ENV BUILD_DOCKER_URL=BUILD_DOCKER_URL_${ARCH} \ SYSTEM_DOCKER_URL_arm64=${SYSTEM_DOCKER_URL_arm64} \ USER_DOCKER_VERSION=${USER_DOCKER_VERSION} \ USER_DOCKER_ENGINE_VERSION=${USER_DOCKER_ENGINE_VERSION} \ - VMWARE_AUTOFORMAT=${VMWARE_AUTOFORMAT} \ AZURE_SERVICE=${AZURE_SERVICE} ENV PATH=${GOPATH}/bin:/usr/local/go/bin:$PATH diff --git a/scripts/global-vmware.cfg b/scripts/global-vmware.cfg deleted file mode 100644 index 48551154..00000000 --- a/scripts/global-vmware.cfg +++ /dev/null @@ -1 +0,0 @@ -APPEND rancher.autologin=tty1 rancher.autologin=ttyS0 rancher.autologin=ttyS1 rancher.autologin=ttyS1 rancher.state.autoformat=[/dev/sda,/dev/vda] rancher.state.dev=LABEL=RANCHER_STATE console=tty1 console=ttyS0 console=ttyS1 printk.devkmsg=on panic=10 ${APPEND} diff --git a/scripts/package-installer b/scripts/package-installer index aaa623ab..0c0cf84d 100755 --- a/scripts/package-installer +++ b/scripts/package-installer @@ -20,13 +20,14 @@ popd DIST=$(pwd)/dist echo "mkdir -p ${DIST}/boot/isolinux/" mkdir -p ${DIST}/boot/isolinux/ -cat scripts/isolinux.cfg | envsubst > ${DIST}/boot/isolinux/isolinux.cfg -cat scripts/isolinux_label.cfg | LABEL=${VERSION} envsubst > ${DIST}/boot/linux-current.cfg -#cat scripts/isolinux_label.cfg | LABEL=debug APPEND="rancher.debug=true" envsubst > ${DIST}/boot/linux-previous.cfg -if [ "$VMWARE_AUTOFORMAT" = 1 ] && [ -e ".make-vmware" ];then - cat scripts/global-vmware.cfg | LABEL=${VERSION} envsubst > ${DIST}/boot/global.cfg +cat scripts/isolinux.cfg | envsubst > ${DIST}/boot/isolinux/isolinux.cfg +cat scripts/isolinux_label.cfg | LABEL=${VERSION} envsubst > ${DIST}/boot/linux-current.cfg +#cat scripts/isolinux_label.cfg | LABEL=debug APPEND="rancher.debug=true" envsubst > ${DIST}/boot/linux-previous.cfg +if [ "$OS_AUTOFORMAT" = "true" ]; then + APPEND_AUTOFORMAT="rancher.state.autoformat=[/dev/sda,/dev/vda] rancher.state.dev=LABEL=RANCHER_STATE rancher.state.wait=true" + cat scripts/global.cfg | APPEND="$APPEND_AUTOFORMAT" envsubst > ${DIST}/boot/global.cfg else - cat scripts/global.cfg | LABEL=${VERSION} envsubst > ${DIST}/boot/global.cfg + cat scripts/global.cfg | envsubst > ${DIST}/boot/global.cfg fi cp scripts/rancher.png ${DIST}/boot/ diff --git a/scripts/release-vmware b/scripts/release-vmware index 5e6c6fd5..c90815fe 100755 --- a/scripts/release-vmware +++ b/scripts/release-vmware @@ -11,7 +11,7 @@ source ./scripts/version touch dist/publish_gss_${VERSION}.sh dist/publish_gss_latest.sh chmod 755 dist/publish_gss_${VERSION}.sh dist/publish_gss_latest.sh -if [ "$VMWARE_AUTOFORMAT" = 1 ]; then +if [ "$OS_AUTOFORMAT" = "true" ]; then echo "gsutil cp dist/artifacts/rancheros.iso gs://releases.rancher.com/os/latest/vmware/rancheros-autoformat.iso" >> ./dist/publish_gss_latest.sh echo "gsutil cp dist/artifacts/rancheros.iso gs://releases.rancher.com/os/${VERSION}/vmware/rancheros-autoformat.iso" >> ./dist/publish_gss_${VERSION}.sh echo "gsutil cp dist/artifacts/rancheros.iso gs://releases.rancher.com/os/latest/rancheros-vmware.iso" >> ./dist/publish_gss_latest.sh