#!/bin/sh

set -x

cp -f /usr/share/volatile/data/nomodesetlist.txt /boot/grub/
cp -f /usr/share/volatile/data/nomodesetsystemlist.txt /boot/grub/

# GRUB_GFXPAYLOAD workarounds for baytrail and braswell
echo "v8086d0f31.*" > /usr/share/grub-gfxpayload-lists/blacklist/30_baytrail
echo "v8086d22b1.*" > /usr/share/grub-gfxpayload-lists/blacklist/30_braswell

# https://bugs.launchpad.net/stella/cnb-atami/+bug/1653611
export APT_OPTIONS="--yes --allow-downgrades --allow-remove-essential --allow-unauthenticated -o Acquire::http::No-Cache=True -o Acquire::Retries=3 -o APT::Get::AllowUnauthenticated=true"

apt-get ${APT_OPTIONS} purge manage-hibernate

exit 0

