# Framebuffer is disabled by default on sparc; enable for known good cards

if ! grep -q "\(framebuffer\|fb\)=" /proc/cmdline; then
	if [ -f /proc/fb ]; then
		# Hack because direct grep on /proc/fb fails (#388815)
		_FB="$(dd if=/proc/fb bs=16 2>/dev/null)"
		if [ $(echo "$_FB" | wc -l) -eq 1 ] && \
		   echo "$_FB" | grep -q "ATY Mach64"; then
			debconf-set debian-installer/framebuffer true
		fi
	fi
fi
