cloud-init.sh 359 B

12345678910111213141516
  1. #!/bin/bash
  2. set -x -e
  3. MOUNT_POINT=/media/config-2
  4. CONFIG_DEV=$(ros dev "LABEL=config-2")
  5. mkdir -p ${MOUNT_POINT}
  6. if [ -e "${CONFIG_DEV}" ]; then
  7. mount -t iso9660,vfat ${CONFIG_DEV} ${MOUNT_POINT}
  8. else
  9. mount -t 9p -o trans=virtio,version=9p2000.L config-2 ${MOUNT_POINT} 2>/dev/null || true
  10. fi
  11. cloud-init -save -network=${CLOUD_INIT_NETWORK:-true}