From ade5a44f3059ccf2e0f692a2eeee34c344cba2c4 Mon Sep 17 00:00:00 2001 From: Medya Gh Date: Tue, 21 Apr 2020 21:53:54 -0700 Subject: [PATCH] make all /var presistant on VM ISO --- .../package/automount/minikube-automount | 45 ++++++++----------- .../iso/minikube-iso/package/podman/podman.mk | 2 - 2 files changed, 19 insertions(+), 28 deletions(-) diff --git a/deploy/iso/minikube-iso/package/automount/minikube-automount b/deploy/iso/minikube-iso/package/automount/minikube-automount index 77e5fda1fe72..fdae5f5c25ec 100755 --- a/deploy/iso/minikube-iso/package/automount/minikube-automount +++ b/deploy/iso/minikube-iso/package/automount/minikube-automount @@ -88,38 +88,31 @@ if [ -n "$BOOT2DOCKER_DATA" ]; then mount $BOOT2DOCKER_DATA /mnt/$PARTNAME fi - # Just in case, the links will fail if not - umount -f /var/lib/docker || true - rm -rf /var/lib/docker /var/lib/boot2docker - mkdir -p /var/lib + rm -rf /var + mkdir -p /var + mkdir -p /run + ln -s /var/run /run + mkdir -p /var/lib/boot2docker + mkdir -p /var/lib/cni + mkdir -p /var/lib/kubelet + mkdir -p /var/lib/docker + mkdir -p /var/lib/containerd + mkdir -p /var/lib/containers + mkdir -p /var/log + mkdir -p /var/tmp - mkdir -p /mnt/$PARTNAME/var/lib/boot2docker - mkdir /var/lib/boot2docker - mount --bind /mnt/$PARTNAME/var/lib/boot2docker /var/lib/boot2docker + mkdir -p /mnt/$PARTNAME/var/lib/boot2docker + mkdir -p /mnt/$PARTNAME/var/lib/cni + mkdir -p /mnt/$PARTNAME/var/lib/kubelet mkdir -p /mnt/$PARTNAME/var/lib/docker - mkdir -p /var/lib/docker - mount --bind /mnt/$PARTNAME/var/lib/docker /var/lib/docker - + mkdir -p /mnt/$PARTNAME/var/lib/containerd mkdir -p /mnt/$PARTNAME/var/lib/containers - mkdir -p /var/lib/containers - mount --bind /mnt/$PARTNAME/var/lib/containers /var/lib/containers - mkdir -p /mnt/$PARTNAME/var/log - mkdir /var/log - mount --bind /mnt/$PARTNAME/var/log /var/log - mkdir -p /mnt/$PARTNAME/var/tmp - mkdir /var/tmp - mount --bind /mnt/$PARTNAME/var/tmp /var/tmp - - mkdir -p /mnt/$PARTNAME/var/lib/kubelet - mkdir /var/lib/kubelet - mount --bind /mnt/$PARTNAME/var/lib/kubelet /var/lib/kubelet - - mkdir -p /mnt/$PARTNAME/var/lib/cni - mkdir /var/lib/cni - mount --bind /mnt/$PARTNAME/var/lib/cni /var/lib/cni + + + mount --bind /mnt/$PARTNAME/var /var mkdir -p /mnt/$PARTNAME/data mkdir /data diff --git a/deploy/iso/minikube-iso/package/podman/podman.mk b/deploy/iso/minikube-iso/package/podman/podman.mk index fb12281c9d94..8781c0b0b9ba 100644 --- a/deploy/iso/minikube-iso/package/podman/podman.mk +++ b/deploy/iso/minikube-iso/package/podman/podman.mk @@ -29,8 +29,6 @@ endef define PODMAN_INSTALL_TARGET_CMDS $(INSTALL) -Dm755 $(@D)/bin/podman $(TARGET_DIR)/usr/bin/podman - $(INSTALL) -d -m 755 $(TARGET_DIR)/etc/cni/net.d/ - $(INSTALL) -m 644 cni/87-podman-bridge.conflist $(TARGET_DIR)/etc/cni/net.d/87-podman-bridge.conflist endef $(eval $(generic-package))