#!/bin/bash
#network
read -p 'Are you configuration of the network (yes/no)' aaa
if [ $aaa = yes ]
then
echo "
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
auto eth0
allow-hotplug eth0
iface eth0 inet static
address 192.168.2.205
netmask 255.255.255.0
gateway 192.168.2.1
dns-nameservers 114.114.114.114
" > /etc/network/interfaces
echo "
nameserver 114.114.114.114">> /etc/resolv.conf
/etc/init.d/networking restart &>/dev/unll
fi
#peizhi xingxi
read -p 'Enter the machine serial number: ' bbb
echo 'NO.$bbb'
echo "######## kernel name #######"
uname -a |cut -f2-3 -d ' '
echo "######## zhuban #######"
dmidecode | grep 'Product Name'|tail -n1
echo "######## CPU #######"
dmidecode -t processor |grep 'Version'
echo "######## neicun #######"
dmidecode -t memory | grep 'Size\|Speed\|Manu'|grep -v 'No\|Un\|Dimm'
echo "######## yingpan #######"
cat /proc/scsi/scsi |grep 'Model\|Host'
fdisk -l |grep sd
echo "######## network card #######"
dmesg | grep eth
|