1
0
mirror of https://github.com/rancher/os.git synced 2025-09-01 06:40:31 +00:00

Merge pull request #1308 from SvenDowideit/move-os-release-file

Move the os-release file to /usr/lib and softlink
This commit is contained in:
Sven Dowideit
2016-11-22 08:26:27 +10:00
committed by GitHub
4 changed files with 23 additions and 32 deletions

View File

@@ -2,4 +2,4 @@
set -e
cd $(dirname $0)/..
rm -rf build dist bin images/*/build
rm -rf build dist bin images/*/build state

View File

@@ -22,6 +22,25 @@ 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
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