8.1: a SuSE cronjob hangs all my machines
From: tj (tj_at_nospam.com)
Date: 12/23/03
- Next message: HaroldWho: "Re: Compiling Kernel: Failure of 'make menuconfig' and a Fix"
- Previous message: Jimbo: "Re: setup lmule"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 23 Dec 2003 20:12:03 GMT
I have several machines, mostly "barebones" PCs, used as webservers. All
have the "minimal" SuSE 8.1 Pro installation (no GUI).
The only changes I make are: configure the network settings and the apache
settings.
Every night, all machines crash after running this script in the
/etc/cron.daily directory. This and the other scripts areprovided by SuSE
and have not been modified.
/etc/cron.daily/suse.de-backup-rpmdb
When I run this particular script from the command line, my screen goes
black and the machine hangs... so you understand that I can't get any
"echoed" debug output.
I don't really need these backups, but I would like some insight as to why
they are hanging my system! Give me a few tests to run, and I will gladly
debug this sucker. From what I can see, the supporting files needed to
"source" the config variables are present, permissions are good... as
mentioned earlier - these are just as they come from the plain
installation.
Thanks
--
TJ
#!/bin/sh
#
#
# backup_rpmdb. This script was split off cron.daily
# Please add your local changes to cron.daily.local
# since this file will be overwritten, when updating your system.
#
# Copyright (c) 1996-2002 SuSE Linux AG, Nuernberg, Germany.
#
# please send bugfixes or comments to feedback@suse.de.
#
# Author: Burchard Steinbild <feedback@suse.de>, 1996
# Florian La Roche <feedback@suse.de>, 1996
#
#
# paranoia settings
#
umask 022
PATH=/sbin:/bin:/usr/sbin:/usr/bin
export PATH
#
# get information from /etc/sysconfig
#
if [ -f /etc/sysconfig/backup ] ; then
. /etc/sysconfig/backup
fi
#
# create backups of rpm data base
#
if test -n "$RPMDB_BACKUP_DIR" -a -e /var/lib/rpm/packages.rpm ; then
mkdir -p $RPMDB_BACKUP_DIR
OLD_MD5=""
test -e $RPMDB_BACKUP_DIR/rpmdb_recent_md5 && \
OLD_MD5="`cat $RPMDB_BACKUP_DIR/rpmdb_recent_md5`"
NEW_MD5="`cat /var/lib/rpm/packages.rpm | md5sum`"
if test "$OLD_MD5" != "$NEW_MD5" ; then
DATESTRING=`date +"%Y%m%d"`
NEWNAME=$RPMDB_BACKUP_DIR/packages.rpm-$DATESTRING
NUMBER=2
while [ -e $NEWNAME -o -e $NEWNAME.gz ] ; do
NEWNAME=$RPMDB_BACKUP_DIR/packages.rpm-$DATESTRING-$NUMBER
NUMBER=`expr $NUMBER + 1`
done
if gzip -9 < /var/lib/rpm/packages.rpm > $NEWNAME.gz; then
echo "$NEW_MD5" > $RPMDB_BACKUP_DIR/rpmdb_recent_md5
test "$MAX_RPMDB_BACKUPS" -gt 0 2> /dev/null ||
MAX_RPMDB_BACKUPS=0
NUMBER=1
for BACKUPFILE in `ls -1 -t $RPMDB_BACKUP_DIR/packages.rpm-*` ;
do
if test "$NUMBER" -gt "$MAX_RPMDB_BACKUPS" ; then
rm -f $BACKUPFILE
fi
NUMBER=`expr $NUMBER + 1`
done
else
echo "ERROR!! can not backup RPM Database to $RPMDB_BACKUP_DIR."
echo "Maybe there is not enough disk space."
rm -f $NEWNAME $NEWNAME.gz
fi
fi
fi
exit 0
- Next message: HaroldWho: "Re: Compiling Kernel: Failure of 'make menuconfig' and a Fix"
- Previous message: Jimbo: "Re: setup lmule"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|