fix appends on user data

This commit is contained in:
Anthony Young 2011-11-10 13:04:40 -08:00
parent b225682189
commit 2838f12e75

View file

@ -171,7 +171,7 @@ instance-type: m1.ignore
local-hostname: $GUEST_NAME.local local-hostname: $GUEST_NAME.local
EOF EOF
# set metadata # set user-data
cat > $vm_dir/uec/user-data<<EOF cat > $vm_dir/uec/user-data<<EOF
#!/bin/bash #!/bin/bash
# hostname needs to resolve for rabbit # hostname needs to resolve for rabbit
@ -191,7 +191,7 @@ EOF
# Setup stack user with our key # Setup stack user with our key
if [ -e ~/.ssh/id_rsa.pub ]; then if [ -e ~/.ssh/id_rsa.pub ]; then
cat > $vm_dir/uec/user-data<<EOF cat >> $vm_dir/uec/user-data<<EOF
mkdir -p /opt/stack mkdir -p /opt/stack
useradd stack -s /bin/bash -d /opt/stack -G libvirtd || true useradd stack -s /bin/bash -d /opt/stack -G libvirtd || true
echo stack:pass | chpasswd echo stack:pass | chpasswd
@ -209,7 +209,7 @@ EOF
fi fi
# Run stack.sh # Run stack.sh
cat > $vm_dir/uec/user-data<<EOF cat >> $vm_dir/uec/user-data<<EOF
./stack.sh ./stack.sh
EOF EOF