Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- create_removesystemd_once() {
- cat <<-'EOF'
- #!/bin/bash
- ### BEGIN INIT INFO
- # Provides: removesystemd_once
- # Required-Start: $all
- # Required-Stop:
- # Default-Start: 2 3 4 5 S
- # Default-Stop:
- # Short-Description: Remove systemd
- # Description:
- ### END INIT INFO
- . /lib/lsb/init-functions
- case "$1" in
- start)
- rm /etc/init.d/removesystemd_once
- update-rc.d removesystemd_once remove
- nohup apt-get remove --yes --purge --auto-remove systemd >/dev/null 2>&1 &
- exit 0
- ;;
- *)
- echo "Usage: $0 start" >&2
- exit 3
- ;;
- esac
- EOF
- } # create_removesystemd_once
- create_removesystemd_once >/etc/init.d/removesystemd_once
- chmod 700 /etc/init.d/removesystemd_once
- update-rc.d removesystemd_once defaults
- apt-get install -y sysvinit-core sysvinit sysvinit-utils
- echo -e 'Package: systemd\nPin: origin ""\nPin-Priority: -1' >/etc/apt/preferences.d/systemd
- 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