Add a custom initctl script to fix Ubuntu 14.04. Disable 12.04

pull/63/head
Oskar Schöldström 9 years ago
parent 7038d6ed61
commit 6e9b80c193
  1. 12
      .travis.yml
  2. 3
      tests/Dockerfile.ubuntu-12.04
  3. 3
      tests/Dockerfile.ubuntu-14.04
  4. 23
      tests/initctl_faker

@ -17,11 +17,11 @@ env:
init: /sbin/init
run_opts: ""
playbook: test.yml
- distribution: ubuntu
version: 12.04
init: /sbin/init
run_opts: ""
playbook: test.yml
# - distribution: ubuntu
# version: 12.04
# init: /sbin/init
# run_opts: ""
# playbook: test.yml
services:
- docker
@ -70,4 +70,4 @@ script:
|| (echo 'MySQL not running' && exit 1)
# Clean up
- 'sudo docker stop "$(cat ${container_id})"'
- sudo docker stop "$(cat ${container_id})"

@ -7,5 +7,8 @@ RUN apt-add-repository -y ppa:ansible/ansible
RUN apt-get update
RUN apt-get install -y ansible
COPY initctl_faker .
RUN chmod +x initctl_faker && rm -fr /sbin/initctl && ln -s /initctl_faker /sbin/initctl
# Install Ansible inventory file
RUN echo "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts

@ -7,5 +7,8 @@ RUN apt-add-repository -y ppa:ansible/ansible
RUN apt-get update
RUN apt-get install -y ansible
COPY initctl_faker .
RUN chmod +x initctl_faker && rm -fr /sbin/initctl && ln -s /initctl_faker /sbin/initctl
# Install Ansible inventory file
RUN echo "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts

@ -0,0 +1,23 @@
#!/bin/sh
ALIAS_CMD="$(echo ""$0"" | sed -e 's?/sbin/??')"
case "$ALIAS_CMD" in
start|stop|restart|reload|status)
exec service $1 $ALIAS_CMD
;;
esac
case "$1" in
list )
exec service --status-all
;;
reload-configuration )
exec service $2 restart
;;
start|stop|restart|reload|status)
exec service $2 $1
;;
\?)
exit 0
;;
esac