summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2011-01-24 15:34:23 +1000
committerStephen Hemminger <stephen.hemminger@vyatta.com>2011-01-24 15:34:23 +1000
commit7afbca72c1dfaf273eb366b2b372855ac1505440 (patch)
tree30e5474906ec132b250edae9801c408cb3f8c913
parent3c9d639f65240d1745b6186a16ce0f6eb918e65c (diff)
parent73dfd3113cfb1226366023ef61cae7c870b6159f (diff)
downloadvyatta-op-mendocino.tar.gz
vyatta-op-mendocino.zip
Merge branch 'mendocino' of suva.vyatta.com:/git/vyatta-op into mendocinomendocino
-rw-r--r--.frlog1
-rw-r--r--Makefile.am2
-rw-r--r--debian/changelog78
-rw-r--r--debian/control2
-rw-r--r--debian/lintian1
-rwxr-xr-xdebian/rules1
-rw-r--r--debian/vyatta-op.postinst.in4
-rw-r--r--etc/bash_completion.d/vyatta-op (renamed from etc/bash_completion.d/10vyatta-op)19
-rwxr-xr-xfunctions/tech-support2
-rw-r--r--scripts/rename-image.pl3
-rwxr-xr-xscripts/vyatta-boot-image.pl5
-rw-r--r--templates/disconnect/interface/node.tag/node.def2
-rw-r--r--templates/show/configuration/commands/node.def (renamed from templates/show/configuration/cmds/node.def)0
-rw-r--r--templates/show/log/all/node.def3
-rw-r--r--templates/show/system/memory/cache/node.def2
-rw-r--r--templates/show/system/memory/detail/node.def2
-rw-r--r--templates/show/system/memory/node.def2
-rw-r--r--templates/show/system/processes/extensive/node.def2
-rw-r--r--templates/show/system/processes/tree/node.def2
19 files changed, 127 insertions, 6 deletions
diff --git a/.frlog b/.frlog
new file mode 100644
index 0000000..4a1017d
--- /dev/null
+++ b/.frlog
@@ -0,0 +1 @@
+Tue Dec 28 20:39:33 UTC 2010: [new branch] at [debian/0.13.100]
diff --git a/Makefile.am b/Makefile.am
index fe214da..302f108 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,7 +1,7 @@
defaultdir = /etc/default
default_DATA = etc/default/vyatta
completiondir = /etc/bash_completion.d
-completion_DATA = etc/bash_completion.d/10vyatta-op
+completion_DATA = etc/bash_completion.d/vyatta-op
opdir = $(datadir)/vyatta-op/templates
bin_sudo_usersdir = $(bindir)/sudo-users
diff --git a/debian/changelog b/debian/changelog
index d97f31b..bb437d4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,81 @@
+vyatta-op (0.13.100+mendocino2) unstable; urgency=low
+
+ * don't use conffiles (not the vyatta way)
+ * correctly handle renamed file
+
+ -- An-Cheng Huang <ancheng@vyatta.com> Thu, 20 Jan 2011 18:24:03 -0800
+
+vyatta-op (0.13.100+mendocino1) unstable; urgency=low
+
+ * new branch
+
+ -- An-Cheng Huang <ancheng@vyatta.com> Tue, 28 Dec 2010 20:39:36 +0000
+
+vyatta-op (0.13.100) unstable; urgency=low
+
+ * provide default filename completion
+
+ -- An-Cheng Huang <ancheng@vyatta.com> Tue, 21 Dec 2010 11:28:22 -0800
+
+vyatta-op (0.13.99) unstable; urgency=low
+
+ * Add show system memory detail
+ * Add more options to show system processes
+ * Add show system memory cache
+
+ -- Stephen Hemminger <stephen.hemminger@vyatta.com> Tue, 07 Dec 2010 11:10:11 -0800
+
+vyatta-op (0.13.98) unstable; urgency=low
+
+ * Add default command completion
+
+ -- Stephen Hemminger <stephen.hemminger@vyatta.com> Wed, 01 Dec 2010 09:09:16 -0800
+
+vyatta-op (0.13.97) unstable; urgency=low
+
+ * Use new bash completion for empty command
+
+ -- Stephen Hemminger <stephen.hemminger@vyatta.com> Tue, 30 Nov 2010 20:46:17 -0800
+
+vyatta-op (0.13.96) unstable; urgency=low
+
+ * Rename 10vyatta-op to vyatta-op
+
+ -- Stephen Hemminger <stephen.hemminger@vyatta.com> Wed, 24 Nov 2010 10:49:31 -0800
+
+vyatta-op (0.13.95) unstable; urgency=low
+
+ * Bugfix 6101: Add syslog record when a system image is re-named.
+
+ -- Bob Gilligan <gilligan@vyatta.com> Sun, 21 Nov 2010 05:12:56 -0800
+
+vyatta-op (0.13.94) unstable; urgency=low
+
+ * Bugfix 6101: Add logging for system image change and delete.
+ * Allow admin users to disconnect PPP links.
+
+ -- Bob Gilligan <gilligan@vyatta.com> Sun, 21 Nov 2010 02:48:16 -0800
+
+vyatta-op (0.13.93) unstable; urgency=low
+
+ [ Stephen Hemminger ]
+ * Use lesspipe to display gzip files
+
+ [ Stig Thormodsrud ]
+ * Fix 6353: ENH: Rename "show configuration cmds"
+
+ -- Stig Thormodsrud <stig@vyatta.com> Mon, 22 Nov 2010 11:35:05 -0800
+
+vyatta-op (0.13.92) unstable; urgency=low
+
+ [ Stephen Hemminger ]
+ * remove deprecated linda override
+
+ [ Deepti Kulkarni ]
+ * bug fix for 6192 - enhancement to add "iptables-save" to "show
+
+ -- Deepti Kulkarni <deepti@vyatta.com> Tue, 16 Nov 2010 20:10:28 +0000
+
vyatta-op (0.13.91) unstable; urgency=low
[ Stephen Hemminger ]
diff --git a/debian/control b/debian/control
index 724c211..485c457 100644
--- a/debian/control
+++ b/debian/control
@@ -18,7 +18,7 @@ Depends: sed (>= 4.1.5),
lsof,
coreutils (>= 5.97-5.3),
host,
- vyatta-bash | bash (>= 3.1),
+ vyatta-bash | bash (>= 4.1),
less,
libio-prompt-perl,
mail-transport-agent,
diff --git a/debian/lintian b/debian/lintian
index 99e6c54..39697b6 100644
--- a/debian/lintian
+++ b/debian/lintian
@@ -1,3 +1,4 @@
vyatta-op: file-in-unusual-dir
vyatta-op: dir-or-file-in-opt
+vyatta-op: file-in-etc-not-marked-as-conffile
vyatta-op: shell-script-fails-syntax-check ./opt/vyatta/bin/vyatta-show-interfaces
diff --git a/debian/rules b/debian/rules
index 6edbcd3..c60eaa7 100755
--- a/debian/rules
+++ b/debian/rules
@@ -70,6 +70,7 @@ binary-indep: build install
dh_compress
dh_fixperms
dh_installdeb
+ rm -f debian/*/DEBIAN/conffiles
if [ -f "../.VYATTA_DEV_BUILD" ]; then \
dh_gencontrol -- -v999.dev; \
else \
diff --git a/debian/vyatta-op.postinst.in b/debian/vyatta-op.postinst.in
index b5d475b..c8f1303 100644
--- a/debian/vyatta-op.postinst.in
+++ b/debian/vyatta-op.postinst.in
@@ -10,3 +10,7 @@ ln -sf /opt/vyatta/sbin/vyatta-interfaces.pl ${bindir}/sudo-users/vyatta-interfa
# rm symlink for sendmail that was added by ssmtp package
rm -f /usr/sbin/sendmail
+
+# handle renamed file (not automatically deleted since it was "conffile")
+rm -f /etc/bash_completion.d/10vyatta-op
+
diff --git a/etc/bash_completion.d/10vyatta-op b/etc/bash_completion.d/vyatta-op
index 6336038..49b6768 100644
--- a/etc/bash_completion.d/10vyatta-op
+++ b/etc/bash_completion.d/vyatta-op
@@ -1,3 +1,4 @@
+# vyatta bash operational mode completion
# **** License ****
# This program is free software; you can redistribute it and/or modify
@@ -76,9 +77,25 @@ _vyatta_op_debug ()
done
}
+# this is needed to provide original "default completion" behavior.
+# see "vyatta-cfg" completion script for details.
+_vyatta_op_default_expand ()
+{
+ local wc=${#COMP_WORDS[@]}
+ if (( wc < 2 )); then
+ _vyatta_op_expand
+ else
+ # after the first word => cannot be vyatta command so use original default
+ compopt -o filenames
+ _filedir_xspec
+ fi
+}
+
_vyatta_op_init ()
{
- complete -F _vyatta_op_expand ''
+ # empty and default line compeletion
+ complete -E -F _vyatta_op_expand
+ complete -D -F _vyatta_op_default_expand
for xd in $vyatta_op_templates/* ; do
if [ -d $xd ] ; then
diff --git a/functions/tech-support b/functions/tech-support
index 910021c..7615c7b 100755
--- a/functions/tech-support
+++ b/functions/tech-support
@@ -246,6 +246,8 @@ sudo /sbin/iptables -t mangle -L -vn
header Raw Chain Details
sudo /sbin/iptables -t raw -L -vn
+header Save Iptables Rule-Set
+sudo iptables-save -c
header SYSTEM
diff --git a/scripts/rename-image.pl b/scripts/rename-image.pl
index e2e9745..837a3ad 100644
--- a/scripts/rename-image.pl
+++ b/scripts/rename-image.pl
@@ -94,6 +94,7 @@ my $line;
while ($line = <GRUBFH>) {
$line =~ s/\/boot\/$old_name/\/boot\/$new_name/g;
$line =~ s/Vyatta $old_name/Vyatta $new_name/;
+ $line =~ s/Vyatta image $old_name/Vyatta image $new_name/;
$line =~ s/Lost password change $old_name/Lost password change $new_name/;
printf($tmpfh $line);
}
@@ -104,5 +105,7 @@ close(GRUBFH);
system("mv $image_path/$old_name $image_path/$new_name");
system("cp $tmpfilename $image_path/grub/grub.cfg");
+system("logger -p local3.warning -t 'SystemImage' 'System image $old_name has been renamed $new_name'");
+
printf("Done.\n");
diff --git a/scripts/vyatta-boot-image.pl b/scripts/vyatta-boot-image.pl
index 9431711..367f4b4 100755
--- a/scripts/vyatta-boot-image.pl
+++ b/scripts/vyatta-boot-image.pl
@@ -296,6 +296,9 @@ Default boot image has been set to "$new_ver".
You need to reboot the system to start the new default image.
EOF
+
+ system("logger -p local3.warning -t 'SystemImage' 'Default boot image has been changed from $def_ver to $new_ver'");
+
exit 0;
}
@@ -463,6 +466,8 @@ sub doDelete {
select_by_name($orig_def_ver, $def_ter);
}
+ system("logger -p local3.warning -t 'SystemImage' 'System Image $del_ver has been deleted'");
+
exit 0;
}
diff --git a/templates/disconnect/interface/node.tag/node.def b/templates/disconnect/interface/node.tag/node.def
index 85233ec..a3b3cf3 100644
--- a/templates/disconnect/interface/node.tag/node.def
+++ b/templates/disconnect/interface/node.tag/node.def
@@ -22,7 +22,7 @@ run:
if [ -n "$PON_PIDS" ]; then
echo "killing pon pids: $PON_PIDS"
for PID in $PON_PIDS ; do
- kill -HUP $PID
+ sudo kill -HUP $PID
done
fi
fi
diff --git a/templates/show/configuration/cmds/node.def b/templates/show/configuration/commands/node.def
index a2d55cf..a2d55cf 100644
--- a/templates/show/configuration/cmds/node.def
+++ b/templates/show/configuration/commands/node.def
diff --git a/templates/show/log/all/node.def b/templates/show/log/all/node.def
index 069d1d4..243cf1b 100644
--- a/templates/show/log/all/node.def
+++ b/templates/show/log/all/node.def
@@ -1,4 +1,5 @@
help: Show contents of all master log files
-run: less $_vyatta_less_options \
+run: eval $(lesspipe)
+ less $_vyatta_less_options \
--prompt=".log?m, file %i of %m., page %dt of %D" \
-- `printf "%s\n" /var/log/messages* | sort -nr`
diff --git a/templates/show/system/memory/cache/node.def b/templates/show/system/memory/cache/node.def
new file mode 100644
index 0000000..5583a54
--- /dev/null
+++ b/templates/show/system/memory/cache/node.def
@@ -0,0 +1,2 @@
+help: Show kernel cache information
+run: slabtop -o
diff --git a/templates/show/system/memory/detail/node.def b/templates/show/system/memory/detail/node.def
new file mode 100644
index 0000000..04e98c5
--- /dev/null
+++ b/templates/show/system/memory/detail/node.def
@@ -0,0 +1,2 @@
+help: Report detailed system memory usage
+run: cat /proc/meminfo
diff --git a/templates/show/system/memory/node.def b/templates/show/system/memory/node.def
index f66ce62..cee2320 100644
--- a/templates/show/system/memory/node.def
+++ b/templates/show/system/memory/node.def
@@ -1,2 +1,2 @@
-help: Show system memory usage
+help: Display system memory usage
run: free -ot
diff --git a/templates/show/system/processes/extensive/node.def b/templates/show/system/processes/extensive/node.def
new file mode 100644
index 0000000..d737c21
--- /dev/null
+++ b/templates/show/system/processes/extensive/node.def
@@ -0,0 +1,2 @@
+help: Show extensive process info
+run: top -b -n1
diff --git a/templates/show/system/processes/tree/node.def b/templates/show/system/processes/tree/node.def
new file mode 100644
index 0000000..b3044fc
--- /dev/null
+++ b/templates/show/system/processes/tree/node.def
@@ -0,0 +1,2 @@
+help: Show process tree
+run: ps -ejH