mirror of
https://codeberg.org/scottslowe/learning-tools.git
synced 2026-03-11 09:04:37 +00:00
17 lines
554 B
Bash
Executable file
17 lines
554 B
Bash
Executable file
#!/bin/bash
|
|
|
|
# Make directory for NoCloud cloud-init datasource
|
|
if [ ! -d "/var/lib/cloud/seed/nocloud" ]; then
|
|
mkdir /var/lib/cloud/seed/nocloud
|
|
fi
|
|
|
|
# Put files into the correct locations for cloud-init
|
|
# First move the user-data file, if it exists in the home directory
|
|
if [ -f "/home/vagrant/user-data" ]; then
|
|
mv /home/vagrant/user-data /var/lib/cloud/seed/nocloud/
|
|
fi
|
|
|
|
# Next move the meta-data file, if it exists in the home directory
|
|
if [ -f "/home/vagrant/meta-data" ]; then
|
|
mv /home/vagrant/meta-data /var/lib/cloud/seed/nocloud/
|
|
fi
|