summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog18
-rw-r--r--scripts/limericks.py51
-rw-r--r--templates/restart/ntp/node.def12
-rw-r--r--templates/restart/snmp/node.def12
-rw-r--r--templates/restart/ssh/node.def12
-rw-r--r--templates/restart/telnet/node.def14
-rw-r--r--templates/show/version/funny/node.def5
7 files changed, 124 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index 2e0fd2e..8755dcc 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -43,6 +43,24 @@ vyatta-op (0.14.0+vyos2+current1) unstable; urgency=medium
-- Kim Hagen <kim.sidney@gmail.com> Sun, 24 Jan 2016 15:19:11 -0500
+vyatta-op (0.14.0+vyos2+lithium14) unstable; urgency=low
+
+ * Remove referenced to Vyatta from 'show version' completion help.
+ * Easter egg: 'show version funny' command that displays limericks
+
+ -- Daniil Baturin <daniil@baturin.org> Sat, 19 Dec 2015 05:00:49 +0100
+
+vyatta-op (0.14.0+vyos2+lithium13) unstable; urgency=low
+
+ [ Alex Harpin ]
+ * vyatta-op: add restart cli command for ntp
+ * vyatta-op: add restart cli command for telnet
+ * vyatta-op: add "check if service is configured" to restart commands
+ * vyatta-op: add restart cli command for snmp
+ * vyatta-op: add restart cli command for ssh
+
+ -- Alex Harpin <development@landsofshadow.co.uk> Sat, 21 Nov 2015 11:30:24 +0000
+
vyatta-op (0.14.0+vyos2+lithium12) unstable; urgency=low
[ Thomas Jepp ]
diff --git a/scripts/limericks.py b/scripts/limericks.py
new file mode 100644
index 0000000..acb1a74
--- /dev/null
+++ b/scripts/limericks.py
@@ -0,0 +1,51 @@
+#!/usr/bin/env python
+
+import random
+
+limericks = [
+
+"""
+A programmer who's name was Searle
+Once wrote a long program in Perl.
+Despite very few quirks
+No one got how it works,
+Not even the interpreter.
+""",
+
+"""
+There was a young lady of Maine
+Who set up IPsec VPN.
+Problems didn't arise
+'til other vendors' device
+had to add she to that VPN.
+""",
+
+"""
+One day a programmer from York
+started his own Vyatta fork.
+Though he was a huge geek,
+it still took him a week
+to get the damn build scripts to work.
+""",
+
+"""
+A network admin from Hong Kong
+knew MPPE cipher's not strong.
+But he was behind NAT,
+so he put up we that,
+sad network admin from Hong Kong.
+""",
+
+"""
+A network admin named Drake
+greeted friends with a three-way handshake
+and refused to proceed
+if they didn't complete it,
+that standards-compliant guy Drake.
+"""
+
+]
+
+l = limericks[random.randint(0, len(limericks) - 1)]
+
+print(l)
diff --git a/templates/restart/ntp/node.def b/templates/restart/ntp/node.def
new file mode 100644
index 0000000..d94bb8e
--- /dev/null
+++ b/templates/restart/ntp/node.def
@@ -0,0 +1,12 @@
+help: Restart NTP service
+
+run:
+ if cli-shell-api existsActive system ntp server; then
+ echo "Restarting NTP server..."
+ sudo /usr/sbin/invoke-rc.d ntp force-reload
+ if [[ $? -eq 0 ]]; then
+ echo "Success!"
+ fi
+ else
+ echo "NTP server is not configured"
+ fi
diff --git a/templates/restart/snmp/node.def b/templates/restart/snmp/node.def
new file mode 100644
index 0000000..689b035
--- /dev/null
+++ b/templates/restart/snmp/node.def
@@ -0,0 +1,12 @@
+help: Restart SNMP service
+
+run:
+ if cli-shell-api existsActive service snmp; then
+ echo "Restarting SNMP..."
+ sudo /opt/vyatta/sbin/vyatta-snmp.pl --restart-snmp;
+ if [[ $? -eq 0 ]]; then
+ echo "Success!"
+ fi
+ else
+ echo "SNMP is not configured"
+ fi
diff --git a/templates/restart/ssh/node.def b/templates/restart/ssh/node.def
new file mode 100644
index 0000000..1fa1aff
--- /dev/null
+++ b/templates/restart/ssh/node.def
@@ -0,0 +1,12 @@
+help: Restart SSH service
+
+run:
+ if cli-shell-api existsActive service ssh; then
+ echo "Restarting SSH..."
+ sudo /usr/sbin/invoke-rc.d ssh restart
+ if [[ $? -eq 0 ]]; then
+ echo "Success!"
+ fi
+ else
+ echo "SSH is not configured"
+ fi
diff --git a/templates/restart/telnet/node.def b/templates/restart/telnet/node.def
new file mode 100644
index 0000000..25c305d
--- /dev/null
+++ b/templates/restart/telnet/node.def
@@ -0,0 +1,14 @@
+help: Restart Telnet service
+
+run:
+ if cli-shell-api existsActive service telnet; then
+ port="$(cli-shell-api returnActiveValue service telnet port)"
+ listen_address="$(cli-shell-api returnActiveValue service telnet listen-address)"
+ echo "Restarting Telnet..."
+ /opt/vyatta/sbin/vyatta_update_telnet enable $port $listen_address
+ if [[ $? -eq 0 ]]; then
+ echo "Success!"
+ fi
+ else
+ echo "Telnet is not configured"
+ fi
diff --git a/templates/show/version/funny/node.def b/templates/show/version/funny/node.def
new file mode 100644
index 0000000..cb62c96
--- /dev/null
+++ b/templates/show/version/funny/node.def
@@ -0,0 +1,5 @@
+help: Show VyOS version information plus a funny poem
+run:
+ ${vyatta_bindir}/vyatta-show-version
+ ${vyatta_bindir}/limericks.py
+