added routerconfig-to-wiki script

This commit is contained in:
sneak committed 2011-06-08 19:04:37 +02:00
1 parent 9b80112201
commit e2febe9725
3 files changed
+124

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
#!/bin/sh
HOSTS="
r1 r2 r3
switch1 switch2 switch3
"
for HOST in $HOSTS ; do
rm -f ./fetchedconfig
./getconfig.ex $HOST 2> /dev/null > /dev/null
if [ -e ./fetchedconfig ]; then
#DATE=`date -u --rfc-3339=seconds`
#echo "! fetched from $HOST on $DATE" > ${HOST}-config.txt
cat ./fetchedconfig > ${HOST}-config.txt
rm -f ./fetchedconfig
./wikiupdate ${HOST} ./${HOST}-config.txt
rm -f ./${HOST}-config.txt
else
echo "unable to fetch config for $HOST"
fi
done