Add shebang into rc.local

Systemd failed to start rc-local service
due to unknown exec format

blueprint: mos-xenial

Change-Id: Ifc59a75bd3018da108b79843fec6c717df0a319e
This commit is contained in:
Ivan Suzdal 2016-06-21 16:02:48 +03:00
parent 1af3726d6b
commit 12331234b8
1 changed files with 3 additions and 2 deletions

View File

@ -88,8 +88,9 @@ add_str_to_file_if_not_exists /etc/ssh/sshd_config 'UseDNS' 'UseDNS no'
cloud-init-per instance gssapi_disable sed -i -e "/^\s*GSSAPICleanupCredentials yes/d" -e "/^\s*GSSAPIAuthentication yes/d" /etc/ssh/sshd_config
cloud-init-per instance nailgun_agent_0 /bin/sh -c 'echo "rm -f /etc/nailgun-agent/nodiscover" | tee /etc/rc.local'
cloud-init-per instance nailgun_agent_1 /bin/sh -c 'echo "flock -w 0 -o /var/lock/agent.lock -c \"/usr/bin/nailgun-agent >> /var/log/nailgun-agent.log 2>&1\"" | tee -a /etc/rc.local'
cloud-init-per instance nailgun_agent_0 /bin/sh -c 'echo "#!/bin/sh" | tee /etc/rc.local'
cloud-init-per instance nailgun_agent_1 /bin/sh -c 'echo "rm -f /etc/nailgun-agent/nodiscover" | tee -a /etc/rc.local'
cloud-init-per instance nailgun_agent_2 /bin/sh -c 'echo "flock -w 0 -o /var/lock/agent.lock -c \"/usr/bin/nailgun-agent >> /var/log/nailgun-agent.log 2>&1\"" | tee -a /etc/rc.local'
# Copying default bash settings to the root directory
cloud-init-per instance skel_bash cp -f /etc/skel/.bash* /root/