PROBLEM: Oops disrupting processes and crashing system (Pt. 2)

From: Bill K. (billy@spamcop.net)
Date: Wed Mar 01 2000 - 12:57:18 EST


[6.] A small shell script or example program which triggers the
     problem (if possible)

[root@cr957697-a /root]# cat backup.monthly
#! /bin/sh

# Daily backup script

if e2fsck -p /dev/hdc1 && mount /mnt/backup ; then
  if cd /mnt/backup/redhat ; then
    find . -depth | (
      while read file
        do if [ -f "$file" -a ! -f "/`/usr/local/bin/trunc \"$file\"
.z`" ] || [ -d "$file" -a ! -d "/$file" ] \
                || [ -L "$file" -a ! -L "/$file" ]
        then
          rm -rf "$file"
          echo removed: "$file"
        fi
      done
    )
  fi
  if cd /mnt/backup/local ; then
    find . -depth | (
      while read file
        do if [ -f "$file" -a ! -f "/local/`/usr/local/bin/trunc
\"$file\" .z`" ] \
                || [ -d "$file" -a ! -d "/local/$file" ] || [ -L "$file"
-a ! -L "/local/$file" ]
        then
          rm -rf "$file"
          echo removed: "$file"
        fi
      done
    )
  fi
  if cd /mnt/backup/dos ; then
    find . -depth | (
      while read file
        do if [ -f "$file" -a ! -f "/dos/`/usr/local/bin/trunc \"$file\"
.z`" ] \
                || [ -d "$file" -a ! -d "/dos/$file" ] || [ -L "$file"
-a ! -L "/dos/$file" ]
        then
          rm -rf "$file"
          echo removed: "$file"
        fi
      done
    )
  fi
  touch /mnt/backup/.lastbackup-tmp
  if cd / ; then
    find boot etc root usr/{lib/xanim/mods,lib/netscape/plugins,src} var
-not -path \*/tmp/\* | /usr/local/sbin/backup /mnt/backup/redhat
  fi
  if cd /local ; then
    find home usr -not -path \*/tmp/\* | /usr/local/sbin/backup
/mnt/backup/local
  fi
  if cd /dos ; then
    find . -not -path \*/tmp/\* | /usr/local/sbin/backup /mnt/backup/dos
  fi
  mv -f /mnt/backup/.lastbackup-tmp /mnt/backup/.lastbackup
  df /mnt/backup
  umount /mnt/backup
fi

Plus wine compilation & 'less backup.log'.

[root@cr957697-a sbin]# cat backup
#! /bin/bash

# backup utility

while read file ; do
    if [ -d "$file" -a ! -L "$file" ] ; then
        echo "$file"
        mkdir -p "$1/$file"
        chown --reference="$file" "$1/$file"
        chmod --reference="$file" "$1/$file"
        touch --reference="$file" "$1/$file"
    elif [ -L "$file" ] ; then
        echo "$file"
        cp -dpf "$file" "$1/$file"
        chown --reference="$file" "$1/$file"
    elif [ -f "$file" -a ! -L "$file" ] ; then
        gzip -cv "$file" > "$1/.tmp"
        chown --reference="$file" "$1/.tmp"
        chmod --reference="$file" "$1/.tmp"
        touch --reference="$file" "$1/.tmp"
        mv -f "$1/.tmp" "$1/$file.z"
    fi
done

[7.] Environment
[7.1.] Software (add the output of the ver_linux script here)

-- Versions installed: (if some fields are empty or looks
-- unusual then possibly you have very old versions)
Linux cr957697-a 2.2.14 #1 Thu Feb 17 01:33:04 PST 2000 i586 unknown
Kernel modules 2.3.10-pre1
Gnu C egcs-2.91.66
Binutils 2.9.5.0.22
Linux C Library 2.1.3
Dynamic linker ldd (GNU libc) 2.1.3
Procps 2.0.6
Mount 2.10f
Net-tools 1.54
Console-tools 0.3.3
Sh-utils 2.0
Modules Loaded sb uart401 opl3 sound soundcore

[7.2.] Processor information (from /proc/cpuinfo):

processor : 0
vendor_id : GenuineIntel
cpu family : 5
model : 4
model name : Pentium MMX
stepping : 4
cpu MHz : 200.459576
fdiv_bug : no
hlt_bug : no
sep_bug : no
f00f_bug : yes
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu vme de pse tsc msr mce cx8 mmx
bogomips : 399.77

[7.3.] Module information (from /proc/modules):

sb 33716 1 (autoclean)
uart401 6160 1 (autoclean) [sb]
opl3 11400 1
sound 56556 0 [sb uart401 opl3]
soundcore 2372 6 [sb sound]

[7.4.] SCSI information (from /proc/scsi/scsi)

Attached devices: none

[7.5.] Other information that might be relevant to the problem
       (please look in /proc and include all information that you
       think to be relevant):
[X.] Other notes, patches, fixes, workarounds:

-- 
Bill K.  ( b i l l y @ c a f e . n e t )
**** WARNING ****  All unsolicited bulk e-mail received at this address
will be promptly reported to the sender's system administrator, and to 
law enforcement authorities whenever applicable.
(Done through SpamCop.  See http://spamcop.net for details.)

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Mar 07 2000 - 21:00:10 EST