#! /bin/bash # $Id$ # display some information about the system and save it to the logserver echo The defined classes are: echo $classes echo The classes are also saved in $LOGDIR/FAI_CLASSES # now show hardware info [ -x "$(which dmidecode)" ] && dmidecode [ -x "$(which lshw)" ] && lshw -short [ -x "$(which discover)" ] && { discover discover-modprobe -v discover --data-path=xfree86/server/device/driver display discover --data-path=linux/module/name network } # print info about audio device lspci | grep -i audio [ -f /proc/asound/card0/codec#0 ] && grep Codec /proc/asound/card0/codec#0 [ -x "$(which hwinfo)" ] && hwinfo --short echo "Modules needed for PCI devices:" depmod -m pcimodules lspci lsdev lsusb echo "Ethernet cards found: $netdevices_all" echo "Ethernet cards running: $netdevices_up" ip addr show up [ -x "$(which sfdisk)" ] && sfdisk -d # show ide disk geometry grep . /proc/ide/ide?/hd?/geometry /dev/null | sed -e 's#/proc/ide/ide./##' 2>/dev/null [ -f /proc/scsi/scsi ] && cat /proc/scsi/scsi # start software raid /usr/share/mdadm/mkconf > /etc/mdadm/mdadm.conf /etc/init.d/mdadm-raid start # pretty print disks by id and device names find /dev/disk/by-id ! -type d -printf "%-40f\t-> %l\n" | grep -v part | sort -k3 echo "" cat /proc/partitions [ -x "$(which blkid)" ] && blkid for disk in $disklist; do smartctl -i /dev/$disk hdparm -iv /dev/$disk fdisk -lu /dev/$disk parted -s /dev/$disk print LC_ALL=C file -s /dev/$disk?* | grep -v ": empty" done fdisk -lu fai-mount-disk -f lsmod # - - - - - - - - - - - save_dmesg fai-savelog -r