#!/bin/sh cd /afs/mcc/common/config/machines [ -d `hostname -s` ] || mkdir `hostname -s` cd `hostname -s` for i in sda1 hda1;do if grep $i /proc/partitions && ! grep $i /proc/mounts ;then mount /dev/$i /mnt break fi done hostname -f >hostname arch=`uname -m` if [ "$arch" = i686 ];then /ftp/beta/gnu/deb/getinst |sort -u >debinst else /ftp/beta/gnu/deb/getinst64 |sort -u >debinst fi mv debinst ../../software/`cat hostname` cat /proc/cpuinfo >cpuinfo cp -p /etc/fstab fstab cp -p /etc/network/interfaces interfaces uname -a >uname grep getty /etc/inittab|egrep -v '^#' >getty ip addr list >addr ifconfig >ifconfig cat /proc/partitions >partitions fdisk -l >fdisk for i in pvdisplay vgdisplay lvdisplay;do [ -x /sbin/$i ] && /sbin/$i >$i;done [ -f /boot/grub/install ] && cp -p /boot/grub/install grubinstall [ -f /boot/grub/menu.lst ] && cp -p /boot/grub/menu.lst grubmenu free >free if [ -f /mnt/g2/install ];then cp -p /mnt/g2/install stripinstall elif [ -f /mnt/grub/install ];then cp -p /mnt/grub/install stripinstall fi if [ -f /mnt/g2/menu.lst ];then cp -p /mnt/g2/menu.lst stripmenu elif [ -f /mnt/grub/menu.lst ];then cp -p /mnt/grub/menu.lst stripmenu fi [ -d /mnt/image ] && ll /mnt/image >image grep /mnt /proc/mounts && umount /mnt