home *** CD-ROM | disk | FTP | other *** search
- #! /bin/sh
- # postinst script for microcode.ctl
- #
- # see: dh_installdeb(1)
-
-
- set -e
-
- . /usr/share/debconf/confmodule
-
- # summary of how this script can be called:
- # * <postinst> `configure' <most-recently-configured-version>
- # * <old-postinst> `abort-upgrade' <new version>
- # * <conflictor's-postinst> `abort-remove' `in-favour' <package>
- # <new-version>
- # * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
- # <failed-install-package> <version> `removing'
- # <conflicting-package> <version>
- #
- case "$1" in
- configure)
- #
- # Check /dev/cpu/microcode
- #
- # if [ -b /dev/cpu/microcode ]; then
- # # Workaround to my old "bug" in makedev.
- # rm -f /dev/cpu/microcode
- # fi
- # if [ ! -e /dev/cpu/microcode ]; then
- # echo "Device /dev/cpu/microcode doesn't exists. Trying to create it" 1>&2
- # echo "Do you have kernel support for microcode?" 1>&2
- # ( cd /dev && MAKEDEV microcode > /dev/null || true )
- # fi
-
- # new microcode name
- [ -e /usr/share/misc/microcode.dat ] && mv /usr/share/misc/microcode.dat /usr/share/misc/intel-microcode.dat
-
- #
- if ! grep -sq GenuineIntel /proc/cpuinfo; then
- echo "microcode.ctl: Yet we provide only microcodes for Intel processors" 1>&2
- echo "Your CPU seems not an Intel processor." 1>&2
- exit 0
- fi
-
- db_get microcode.ctl/check-new
- if [ "$RET" = true ] ; then
- update-intel-microcode --no-reload 1>&2 || true
- else
- echo "You have choose not to check for new microcoded. To change" 1>&2
- echo 'run "dpkg-reconfigure -plow microcode.ctl"' 1>&2
- fi
-
- ;;
-
- abort-upgrade|abort-remove|abort-deconfigure)
-
- ;;
-
- *)
- echo "postinst called with unknown argument \`$1'" 1>&2
- ;;
- esac
-
- # DEBHELPER will call automagically /etc/init.d/microcode.ctl restart
-
- # Automatically added by dh_installinit
- if [ -x "/etc/init.d/microcode.ctl" ]; then
- update-rc.d microcode.ctl start 80 S . >/dev/null
- if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
- invoke-rc.d microcode.ctl start || exit $?
- else
- /etc/init.d/microcode.ctl start || exit $?
- fi
- fi
- # End automatically added section
-
-
- exit 0
-
-