home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / var / lib / dpkg / info / microcode.ctl.postinst < prev    next >
Encoding:
Text File  |  2009-10-07  |  2.1 KB  |  80 lines

  1. #! /bin/sh
  2. # postinst script for microcode.ctl
  3. #
  4. # see: dh_installdeb(1)
  5.  
  6.  
  7. set -e
  8.  
  9. . /usr/share/debconf/confmodule
  10.  
  11. # summary of how this script can be called:
  12. #        * <postinst> `configure' <most-recently-configured-version>
  13. #        * <old-postinst> `abort-upgrade' <new version>
  14. #        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
  15. #          <new-version>
  16. #        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
  17. #          <failed-install-package> <version> `removing'
  18. #          <conflicting-package> <version>
  19. #
  20. case "$1" in
  21.     configure)
  22.         #
  23.         #   Check /dev/cpu/microcode
  24.         #
  25. #    if [ -b /dev/cpu/microcode ]; then
  26. #        # Workaround to my old "bug" in makedev.
  27. #        rm -f /dev/cpu/microcode
  28. #    fi
  29. #    if [ ! -e /dev/cpu/microcode ]; then
  30. #            echo "Device /dev/cpu/microcode doesn't exists. Trying to create it" 1>&2
  31. #            echo "Do you have kernel support for microcode?" 1>&2
  32. #        ( cd /dev && MAKEDEV microcode > /dev/null || true )
  33. #    fi
  34.  
  35.     # new microcode name
  36.     [ -e /usr/share/misc/microcode.dat ] &&  mv /usr/share/misc/microcode.dat /usr/share/misc/intel-microcode.dat
  37.  
  38.     #
  39.     if ! grep -sq GenuineIntel /proc/cpuinfo; then
  40.         echo "microcode.ctl: Yet we provide only microcodes for Intel processors" 1>&2
  41.         echo "Your CPU seems not an Intel processor." 1>&2
  42.         exit 0
  43.     fi
  44.  
  45.     db_get microcode.ctl/check-new
  46.     if [ "$RET" = true ] ; then
  47.         update-intel-microcode --no-reload 1>&2 || true
  48.     else
  49.         echo "You have choose not to check for new microcoded. To change" 1>&2
  50.         echo 'run  "dpkg-reconfigure -plow microcode.ctl"' 1>&2
  51.     fi
  52.  
  53.     ;;
  54.  
  55.     abort-upgrade|abort-remove|abort-deconfigure)
  56.  
  57.     ;;
  58.  
  59.     *)
  60.         echo "postinst called with unknown argument \`$1'" 1>&2
  61.     ;;
  62. esac
  63.  
  64. # DEBHELPER will call automagically /etc/init.d/microcode.ctl restart
  65.  
  66. # Automatically added by dh_installinit
  67. if [ -x "/etc/init.d/microcode.ctl" ]; then
  68.     update-rc.d microcode.ctl start 80 S . >/dev/null
  69.     if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
  70.         invoke-rc.d microcode.ctl start || exit $?
  71.     else
  72.         /etc/init.d/microcode.ctl start || exit $?
  73.     fi
  74. fi
  75. # End automatically added section
  76.  
  77.  
  78. exit 0
  79.  
  80.