[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Und was will mir cron-apt damit sagen?



On Fri, 28 Sep 2012 03:12:04 +0200, Stefan Baur
<newsgroups.mail2@stefanbaur.de> wrote:
>Es vermeldet per Mail:
>
>Subject: Cron <root@systemname>    test -x /usr/sbin/cron-apt && /usr/sbin/cron-apt (failed)
>Body: /usr/sbin/cron-apt: 306: arithmetic expression: expecting EOF: "376 5 % 3600"
>
>Hatte ich noch nie. Und es ist das einzige aus einer mittleren zweistelligen Systemzahl (die alle identisch installiert sind), was gerade diese Meldung warf.
>
>WTF?

Wenn das ein einmaliges Phänomen ist, hast Du vermutlich einen Bug in
cron-apt gefunden.

Der Code:

|        if [ -z "$RANDOM" ] ; then
|            # A fix for shells that do not have this bash feature.
|            RANDOM=$(dd if=/dev/urandom count=1 2> /dev/null | cksum | cut -c"1-5")
|        fi
|        TIME=$(($RANDOM % $RUNSLEEP))

macht seltsame Dinge, wenn die CRC-Prüfsumme der Zufallszahl kürzer
ist als fünf Zeichen. Ich habe keine Idee, was Ola geritten hat, als
er diesen Code zur Erstellung von Zufallszahlen schrieb.

Du hast die dash als /bin/sh, richtig?

Grüße
Marc
-- 
-------------------------------------- !! No courtesy copies, please !! -----
Marc Haber         |   " Questions are the         | Mailadresse im Header
Mannheim, Germany  |     Beginning of Wisdom "     | http://www.zugschlus.de/
Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fon: *49 621 72739834


Reply to: