1
0
mirror of https://github.com/rancher/os.git synced 2025-09-01 14:48:55 +00:00
Files
os/scripts/dockerimages/scripts/cloud-init.sh
Ivan Mikushin 5b9ef6ae16 rename rancherctl to ros
shorter, easier to use (and just plain cooler) name
2015-05-10 18:17:04 +05:00

18 lines
394 B
Bash
Executable File

#!/bin/bash
set -x -e
MOUNT_POINT=/media/config-2
CONFIG_DEV=$(blkid | grep -- 'LABEL="config-2"' | cut -f1 -d:)
mkdir -p ${MOUNT_POINT}
if [ -e "${CONFIG_DEV}" ]; then
mount ${CONFIG_DEV} ${MOUNT_POINT}
else
mount -t 9p -o trans=virtio,version=9p2000.L config-2 ${MOUNT_POINT} 2>/dev/null || true
fi
ros config get cloud_init
cloud-init -save -network=${CLOUD_INIT_NETWORK:-true}