diff --git a/cmd/control/console_init.go b/cmd/control/console_init.go index 41325e9f..83437eb3 100644 --- a/cmd/control/console_init.go +++ b/cmd/control/console_init.go @@ -85,8 +85,8 @@ func consoleInitAction(c *cli.Context) error { {"/var/lib/rancher/engine/dockerd", "/usr/bin/dockerd"}, {"/var/lib/rancher/engine/docker-proxy", "/usr/bin/docker-proxy"}, {"/var/lib/rancher/engine/docker-runc", "/usr/bin/docker-runc"}, - {"/usr/share/rancher/os-release", "/usr/lib/os-release"}, - {"/usr/share/rancher/os-release", "/etc/os-release"}, + {"/usr/share/ros/os-release", "/usr/lib/os-release"}, + {"/usr/share/ros/os-release", "/etc/os-release"}, } { syscall.Unlink(link.newname) if err := os.Symlink(link.oldname, link.newname); err != nil { diff --git a/os-config.tpl.yml b/os-config.tpl.yml index 05d12c3d..16229f20 100644 --- a/os-config.tpl.yml +++ b/os-config.tpl.yml @@ -131,7 +131,6 @@ rancher: read_only: true volumes: - /usr/bin/ros:/usr/bin/ros:ro - - /usr/share/rancher:/usr/share/rancher:ro console: image: {{.OS_REPO}}/os-console:{{.VERSION}}{{.SUFFIX}} command: ros console-init diff --git a/scripts/layout b/scripts/layout index fcf34091..40d52d8a 100755 --- a/scripts/layout +++ b/scripts/layout @@ -27,6 +27,19 @@ ln -s ros ${INITRD_DIR}/usr/bin/docker-runc ln -s ../../../../usr/bin/ros ${INITRD_DIR}/usr/var/lib/cni/bin/bridge ln -s ../../../../usr/bin/ros ${INITRD_DIR}/usr/var/lib/cni/bin/host-local +cat < ${INITRD_DIR}/usr/share/ros/os-release +NAME="RancherOS" +VERSION=${VERSION} +ID=rancheros +ID_LIKE= +VERSION_ID=${VERSION} +PRETTY_NAME="RancherOS ${VERSION}" +HOME_URL="http://rancher.com/rancher-os/" +SUPPORT_URL="https://forums.rancher.com/c/rancher-os" +BUG_REPORT_URL="https://github.com/rancher/os/issues" +BUILD_ID= +HERE + # Support upgrades from old persistent consoles that bind mount these touch ${INITRD_DIR}/usr/bin/docker-containerd touch ${INITRD_DIR}/usr/bin/docker-containerd-shim diff --git a/scripts/package-rootfs b/scripts/package-rootfs index 3671c3c3..cba25bf8 100755 --- a/scripts/package-rootfs +++ b/scripts/package-rootfs @@ -22,26 +22,6 @@ if [ "$(docker info | grep 'Storage Driver: ' | sed 's/Storage Driver: //')" != exit 0 fi -mkdir -p ${INITRD_DIR}/usr/share/rancher/ -cat < ${INITRD_DIR}/usr/share/rancher/os-release -NAME="RancherOS" -VERSION=${VERSION} -ID=rancheros -ID_LIKE= -VERSION_ID=${VERSION} -PRETTY_NAME="RancherOS ${VERSION}" -HOME_URL="http://rancher.com/rancher-os/" -SUPPORT_URL="https://forums.rancher.com/c/rancher-os" -BUG_REPORT_URL="https://github.com/rancher/os/issues" -BUILD_ID= -HERE - -# need to make relative links to the os-release file -mkdir -p ${INITRD_DIR}/usr/lib -cd ${INITRD_DIR}/usr/lib -ln -s ../share/rancher/os-release os-release -cd $(dirname $0)/.. - DFS=$(docker run -d --privileged -v /lib/modules/$(uname -r):/lib/modules/$(uname -r) ${DFS_IMAGE}${SUFFIX} ${DFS_ARGS}) trap "docker rm -fv ${DFS_ARCH} ${DFS}" EXIT docker exec -i ${DFS} docker load < ${INITRD_DIR}/usr/share/ros/images.tar