#! /bin/sh if [ "$1" ] ; then cat </dev/null chmod -R u+w,a+r,a+X "$dir/$host" for i in `( cd "$dir/$host" ; find proc -type f -size 0 )` ; do cat "/$i" >"$dir/$host/$i" done fi done echo /proc/mounts perl -nl -e 'print unless (split)[0] =~ /none|automount|:/' /proc/mounts >"$dir/$host/proc/mounts" mkdir -p "$dir/$host/var/log" echo " ------ dmesg start ------ " >>"$dir/$host/var/log/boot.msg" dmesg >>"$dir/$host/var/log/boot.msg" if [ -x /usr/bin/lshal ] ; then echo lshal lshal >$dir/$host/lshal.txt 2>/dev/null fi file="$host.tar.gz" tar -C "$dir" -zcf "$dir/$file" "$host" rm -f "/tmp/$file" if [ -e "/tmp/$file" ] ; then echo "Warning: /tmp/$file exists, no info written"\! rm -rf "$dir" exit 1 fi ln -nf "$dir/$file" "/tmp/$file" rm -rf "$dir" echo " System data written to: /tmp/$file"