manage running-config in git
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 8 Jul 2018 08:12:47 +0000 (10:12 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 8 Jul 2018 08:12:47 +0000 (10:12 +0200)
README
sw-running-config.sh [new file with mode: 0755]

diff --git a/README b/README
index a75d495..4cb2677 100644 (file)
--- a/README
+++ b/README
@@ -1,3 +1,11 @@
+# manage Dell switch running-config in git
+
+dpavlin@black:~/dell-switch$ ./sw-running-config.sh sw-dpc
+
+
+
+# ssh auto-login script for Dell switches
+
 ./ips | xargs -i ./dell-switch.pl {} "show bridge address"
 
 ./ips | xargs -i ./dell-switch.pl {} "show interfaces status"
diff --git a/sw-running-config.sh b/sw-running-config.sh
new file mode 100755 (executable)
index 0000000..ffa7167
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/sh -xe
+
+sw=$1
+
+NO_LOG=1 ./dell-switch.pl $sw "copy running-config tftp://10.20.0.216/$sw"
+cd running-config
+git add $sw
+git commit -m $sw