> #cloud-boothook > #!/bin/bash > > if [ ! -f /etc/id ] > then > sed -i 's/preserve_hostname/preserve_hostname: True/g' /etc/cloud/cloud.cfg > sed -i 's/apt_preserve_sources_list/apt_preserve_sources_list: True/g' > /etc/cloud/cloud.cfg
It seems to me that the sed editing here might be creating invalid yaml or at least confusing content in /etc/cloud/cloud.cfg, which would cause cloud-init to fail next time it loaded this file. Ie, i think you've now got: preserve_hostname: TrueORIGINAL_VALUE_HERE apt_preserve_sources_list: TrueORIGINAL_VALUE_HERE one thing that might make this easier, and would have the same affect, is just: echo "preserve_hostname: True" > /etc/cloud/cloud.cfg.d/preserve-hostname.cfg echo "apt_preserve_sources_list: True" > /etc/cloud/cloud.cfg.d/apt_preserve_sources_list -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1086646 Title: text/x-shellscript doesn't run if text/cloud-boothook present To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1086646/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
