Skip to content

Instantly share code, notes, and snippets.

@iMilnb
Last active October 11, 2016 15:45
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save iMilnb/9b104133d5720283d58f to your computer and use it in GitHub Desktop.
Transform Debian Jessie AMI to `sysvinit`
# Simply add the following to the Userdata script so the
# instance bootstrap sequence transforms the debian jessie
# systemd init to good old sysvinit.
# initial method from
# http://without-systemd.org/wiki/index.php/How_to_remove_systemd_from_a_Debian_jessie/sid_installation
# but using a safer and actually working `cat ><<EOF` method
apt-get -y install sysvinit-core sysvinit sysvinit-utils
apt-get remove --purge --auto-remove systemd
cat >/etc/apt/preferences.d/systemd<<EOF
Package: systemd
Pin: origin ""
Pin-Priority: -1
Package: *systemd*
Pin: origin ""
Pin-Priority: -1
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment