1
0
mirror of https://github.com/rancher/os.git synced 2025-09-19 00:59:53 +00:00

generate os-config.yml

This commit is contained in:
Ivan Mikushin
2016-02-23 19:06:14 -08:00
parent 077a902010
commit 8b72377a3c
13 changed files with 142 additions and 374 deletions

13
scripts/gen-os-config.sh Executable file
View File

@@ -0,0 +1,13 @@
#!/bin/bash
set -ex
cd $(dirname $0)/..
set -a
. build.conf
SUFFIX=""
[ "${ARCH}" == "amd64" ] || SUFFIX="_${ARCH}"
set +a
build/host_ros c generate < os-config.tpl.yml > $1

View File

@@ -1,13 +1,10 @@
#!/bin/bash
set -ex
suffix=""
[ "$ARCH" == "amd64" ] || suffix="_${ARCH}"
cd $(dirname $0)/..
. scripts/build-common
images="$(build/host_ros c images -i os-config${suffix}.yml)"
images="$(build/host_ros c images -i build/os-config.yml)"
for i in ${images}; do
[ "${FORCE_PULL}" != "1" ] && docker inspect $i >/dev/null 2>&1 || docker pull $i;
done

View File

@@ -29,7 +29,7 @@ cp assets/docker ${INITRD_DIR}/usr/bin/docker
if [ "$IS_ROOTFS" == "0" ]; then
cp ${BUILD}/images.tar ${INITRD_DIR}/usr/share/ros/
fi
cp os-config${suffix}.yml ${INITRD_DIR}/usr/share/ros/os-config.yml
cp build/os-config.yml ${INITRD_DIR}/usr/share/ros/
cp bin/ros ${INITRD_DIR}/usr/bin/
ln -s usr/bin/ros ${INITRD_DIR}/init
ln -s bin ${INITRD_DIR}/usr/sbin

View File

@@ -102,7 +102,7 @@ if [ "$REBUILD" == "1" ]; then
mkdir -p ${INITRD_TMP}/usr/{bin,share/ros}
cp bin/ros ${INITRD_TMP}/usr/bin/
cp -f os-config.yml ${INITRD_TMP}/usr/share/ros/
cp -f os-config.yml ${INITRD_TMP}/usr/share/ros/ #FIXME: generate os-config.yml from os-config.tpl.yml
pushd ${INITRD_TMP}
find . | cpio -H newc -o | gzip > ${INITRD_TEST}