1
0
mirror of https://github.com/rancher/os.git synced 2025-11-07 02:04:29 +00:00
Files
.github
assets
cmd
compose
config
dfs
docker
hostname
images
init
log
netconf
scripts
hosting
images
installer
conf
kexec
BaseDockerfile.amd64
Dockerfile.amd64
Dockerfile.arm64
README.md
lay-down-os
seed-data
set-disk-partitions
moby
build
build-host
build-images
build-moby
build-target
ci
clean
copy-latest.sh
copy-release.sh
create-installed
default
dev
entry
global-vmware.cfg
global.cfg
hash-initrd
help
inline_schema.go
integration-test
isolinux.cfg
isolinux_label.cfg
layout
layout-initrd
layout-kernel
package
package-initrd
package-installer
package-iso
package-rootfs
prepare
rancher.png
release
ros
run
run-common
run-install
run-moby
schema.json
schema_template
shell
ssh
tar-images
template
test
validate
version
vmware-release
selinux
tests
util
vendor
.dockerignore
.drone.yml
.gitignore
Dockerfile.dapper
LICENSE
Makefile
README.md
main.go
os-config.tpl.yml
rancheros.png
trash.conf
os/scripts/installer/seed-data

26 lines
545 B
Plaintext
Raw Normal View History

#!/bin/bash
set -e -x
2015-11-25 18:33:24 +01:00
SCRIPTS_DIR=$(dirname ${0})
BASE_DIR=${1}
CLOUD_DATA=${2}
IFS=',' read -ra FILES <<< "${3}"
if [ -z ${BASE_DIR} ]; then
echo "Need base directory to place files" 1>&2
exit 1
fi
2015-08-18 12:39:43 +05:00
mkdir -p ${BASE_DIR}/var/lib/rancher/conf/cloud-config.d
2015-11-25 18:33:24 +01:00
if [ "${CLOUD_DATA}" != "${SCRIPTS_DIR}/conf/empty.yml" ]; then
2015-08-18 19:07:00 +05:00
cp ${CLOUD_DATA} ${BASE_DIR}/var/lib/rancher/conf/cloud-config.d/
fi
for f in ${FILES[@]}; do
IFS=":" read s d <<< "${f}"
mkdir -p $(dirname ${BASE_DIR}/${d})
cp -a -T ${s} ${BASE_DIR}/${d}
done