Advertisement
Guest User

removesystemd

a guest
Aug 26th, 2015
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.02 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. create_removesystemd_once() {
  4.     cat <<-'EOF'
  5.     #!/bin/bash
  6.     ### BEGIN INIT INFO
  7.     # Provides: removesystemd_once
  8.     # Required-Start: $all
  9.     # Required-Stop:
  10.     # Default-Start: 2 3 4 5 S
  11.     # Default-Stop:
  12.     # Short-Description: Remove systemd
  13.     # Description:
  14.     ### END INIT INFO
  15.    
  16.     . /lib/lsb/init-functions
  17.    
  18.     case "$1" in
  19.       start)
  20.         rm /etc/init.d/removesystemd_once
  21.         update-rc.d removesystemd_once remove
  22.         nohup apt-get remove --yes --purge --auto-remove systemd >/dev/null 2>&1 &
  23.         exit 0
  24.         ;;
  25.       *)
  26.         echo "Usage: $0 start" >&2
  27.         exit 3
  28.         ;;
  29.     esac
  30. EOF
  31. } # create_removesystemd_once
  32.  
  33. create_removesystemd_once >/etc/init.d/removesystemd_once
  34. chmod 700 /etc/init.d/removesystemd_once
  35. update-rc.d removesystemd_once defaults
  36. apt-get install -y sysvinit-core sysvinit sysvinit-utils
  37. echo -e 'Package: systemd\nPin: origin ""\nPin-Priority: -1' >/etc/apt/preferences.d/systemd
  38. echo -e '\n\nPackage: *systemd*\nPin: origin ""\nPin-Priority: -1' >>/etc/apt/preferences.d/systemd
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement