dump running or startup config (for comparison)
authorDobrica Pavlinusic <dpavlin@rot13.org>
Wed, 6 Apr 2022 07:56:12 +0000 (09:56 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Wed, 6 Apr 2022 07:56:46 +0000 (09:56 +0200)
sw-running-config.sh
sw-startup-config.sh [new symlink]

index 72c791c..8afa007 100755 (executable)
@@ -2,7 +2,9 @@
 
 sw=$1
 
-NO_LOG=1 ./dell-switch.pl $sw "copy running-config tftp://10.20.0.216/$sw"
+config=$( basename $0 | sed -e 's/^sw-//' -e 's/.sh$//' )
+
+NO_LOG=1 ./dell-switch.pl $sw "copy $config tftp://10.20.0.216/$sw"
 cd running-config
 git add $sw
-git commit -m $sw
+git commit -m "$sw $config"
diff --git a/sw-startup-config.sh b/sw-startup-config.sh
new file mode 120000 (symlink)
index 0000000..724726a
--- /dev/null
@@ -0,0 +1 @@
+sw-running-config.sh
\ No newline at end of file