- printf "%15s%15s %s / %s\n" "kernel module" "device" "vender" "model" > $hardwarefile
- printf "%15s%15s %s / %s\n\n" "=============" "======" "======" "=====" >> $hardwarefile
- oldifs=$IFS
- IFS=$'\t\n'
- discover --format="'%m'\t'%d'\t'%V'\t'%M'\n" all | \
- while read module device vender model
- do printf "%15s%15s %s / %s\n" "${module//\'/}" "${device//\'/}" "${vender//\'/}" "${model//\'/}" >> $hardwarefile
- done
- IFS=$oldifs
+ if [ -f $hardwarefile ]; then
+ rm $hardwarefile
+ fi
+ touch $hardwarefile
+ echo -e "\n\n====================== summary ======================\n" >> $hardwarefile
+ debug "hwinfo --short --cpu --network --disk --pci >> $hardwarefile"
+ hwinfo --short --cpu --network --disk --pci >> $hardwarefile
+ for flag in cpu network disk bios pci; do
+ echo -e "\n\n====================== $flag ======================\n" >> $hardwarefile
+ hwinfo --$flag >> $hardwarefile
+ done