sh http://support.lenovo.com/de/de/documents/hf004122

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh http://support.lenovo.com/de/de/documents/hf004122相关的知识,希望对你有一定的参考价值。

#/bin/bash

if [ "$USER" != "root" ]
 then 
   echo "please become root to exec this script"
   exit 0
fi

AKKU_NAME="$(dmidecode | grep -A 10 Battery | grep -E 'Name' | sed s/'.*Name: '//)"

if [[ "$(echo $AKKU_NAME | grep -c 424T)" = "1" ]]
  then
    for s in 695 711 740 798 804 812 816 822 826 828 834 840 862 868 874 880 890 944 948 954 958
      do 
        if [[ "$(echo $AKKU_NAME | grep $s)" ]]
          then 
            echo "YOUR AKKU IS AFFECTED!"
            echo "please sent the following Info to sschwalbe@notebooksbilliger.de"
            echo 
            
            dmidecode | grep -A 12 Battery | grep -E 'Name|Serial|Date'   
            dmidecode | grep -A 8 'System Information' | grep -E 'Serial Number|Version|Product' | sort -r
            
            echo
        fi
      done
fi

if [[ "$(echo $AKKU_NAME | grep -c 45N10)" = "1" ]] 
  then 
    for s in 22 50 
      do 
        if [[ "$(echo $AKKU_NAME | grep $s)" ]]
          then 
            echo "YOUR AKKU IS AFFECTED!"
            echo "please sent the following Info to sschwalbe@notebooksbilliger.de"
            echo 
            
            dmidecode | grep -A 12 Battery | grep -E 'Name|Serial|Date'   
            dmidecode | grep -A 8 'System Information' | grep -E 'Serial Number|Version|Product' | sort -r
            
            echo
        fi
     done
fi

以上是关于sh http://support.lenovo.com/de/de/documents/hf004122的主要内容,如果未能解决你的问题,请参考以下文章