scripts/impression/ethercodes.sh
Vincent Le Gallic a036fdbc54 [/usr/scripts/impression/ethercodes.sh] Avoir tout la commande dans la crontab c'est nettement moins clair qu'un script
Ignore-this: a6c12e349652d9d87ac34768e402a00c

darcs-hash:20121203013613-2c9c1-aebd48efbea95b87fd33613216e0bd6c0529ac05.gz
2012-12-03 02:36:13 +01:00

13 lines
647 B
Bash
Executable file

#!/bin/sh
# Script appelé par cron pour mettre à jour le fichier vendeur
# Avant la comande était entièrement dans la crontab, dans un script ça avait l'air mieux...
TEMPFILE=`tempfile`
umask 002
wget -o /dev/null -O $TEMPFILE http://standards.ieee.org/regauth/oui/oui.txt \
&& awk -F '[\t ]*(hex)[ \t]*' '(/(hex)/) {gsub("-",":",$1) ; print $1" "$2}' < $TEMPFILE > /usr/scripts/gestion/ethercodes.dat \
&& cd /usr/scripts/gestion \
&& darcs record --author "Cron Daemon <root@crans.org>" --patch-name "[ethercodes.dat] Mise a jour du fichier vendeur" --all --no-ask-deps --skip-long-comment ethercodes.dat > /dev/null
rm -f $TEMPFILE