1
0
mirror of https://github.com/rancher/os.git synced 2025-09-01 14:48:55 +00:00

Fix os-release file

This commit is contained in:
Josh Curl
2017-01-19 10:55:51 -08:00
parent a9f19b7d1d
commit f906142534
4 changed files with 15 additions and 23 deletions

View File

@@ -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 {

View File

@@ -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

View File

@@ -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 <<HERE > ${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

View File

@@ -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 <<HERE > ${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