[ethercodes.sh] On appelle un script dans la crontab et on fait attention à l'umask
Ignore-this: 301f436cd8d6224a85d68c5b028d3e7e darcs-hash:20130112034427-2c9c1-18a8f1f021e4a03ac33c87dd4ecea2e3e5d2811a.gz
This commit is contained in:
parent
73bd82682e
commit
bb54dec933
1 changed files with 2 additions and 0 deletions
|
@ -1,13 +0,0 @@
|
|||
#!/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
|
Loading…
Add table
Add a link
Reference in a new issue