mirror of
https://github.com/rancher/os.git
synced 2025-09-15 22:49:08 +00:00
./scripts/run: provision tmp/cloud-config.yml as cloud-config
This commit is contained in:
18
scripts/run
18
scripts/run
@@ -56,13 +56,17 @@ fi
|
||||
|
||||
mkdir -p $(dirname $USER_DATA)
|
||||
|
||||
echo "#cloud-config" > ${USER_DATA}
|
||||
echo "ssh_authorized_keys:" >> ${USER_DATA}
|
||||
for i in ${HOME}/.ssh/*.pub; do
|
||||
if [ -e $i ]; then
|
||||
echo " - $(<$i)" >> ${USER_DATA}
|
||||
fi
|
||||
done
|
||||
if [ -e ../../tmp/cloud-config.yml ]; then
|
||||
cat ../../tmp/cloud-config.yml > ${USER_DATA}
|
||||
else
|
||||
echo "#cloud-config" > ${USER_DATA}
|
||||
echo "ssh_authorized_keys:" >> ${USER_DATA}
|
||||
for i in ${HOME}/.ssh/*.pub; do
|
||||
if [ -e $i ]; then
|
||||
echo " - $(<$i)" >> ${USER_DATA}
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
while [ "$#" -gt 0 ]; do
|
||||
case $1 in
|
||||
|
Reference in New Issue
Block a user