From 34d065a1cd2c465052f965e810facc4ea55cfc15 Mon Sep 17 00:00:00 2001 From: Deepti Kulkarni Date: Tue, 16 Nov 2010 20:08:29 +0000 Subject: bug fix for 6192 - enhancement to add "iptables-save" to "show tech-support" command. --- functions/tech-support | 2 ++ 1 file changed, 2 insertions(+) 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 -- cgit v1.2.3 From 4d69b3d8ef4ec0deb5c8294fea9f911e1e9219a6 Mon Sep 17 00:00:00 2001 From: Deepti Kulkarni Date: Tue, 16 Nov 2010 20:10:29 +0000 Subject: 0.13.92 --- debian/changelog | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/debian/changelog b/debian/changelog index d97f31b..c0260be 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +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 Tue, 16 Nov 2010 20:10:28 +0000 + vyatta-op (0.13.91) unstable; urgency=low [ Stephen Hemminger ] -- cgit v1.2.3 From 470af351a2225e8eac03b27e95ac193846e8824d Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Thu, 18 Nov 2010 14:04:25 -0800 Subject: Use lesspipe to display gzip files Bug 3719 Eval of lesspipe sets environment variables so that less can display gzip'd files --- templates/show/log/all/node.def | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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` -- cgit v1.2.3 From b44facda004ce5ea6d4485778522fb2d11080ab0 Mon Sep 17 00:00:00 2001 From: Bob Gilligan Date: Sun, 21 Nov 2010 02:32:03 -0800 Subject: Bugfix 6101: Add logging for system image change and delete. --- scripts/vyatta-boot-image.pl | 5 +++++ 1 file changed, 5 insertions(+) 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; } -- cgit v1.2.3 From 8e00bccdb5688298c1e005a0c41b002d15704f36 Mon Sep 17 00:00:00 2001 From: Stig Thormodsrud Date: Mon, 22 Nov 2010 11:34:04 -0800 Subject: Fix 6353: ENH: Rename "show configuration cmds" --- templates/show/configuration/cmds/node.def | 7 ------- templates/show/configuration/commands/node.def | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-) delete mode 100644 templates/show/configuration/cmds/node.def create mode 100644 templates/show/configuration/commands/node.def diff --git a/templates/show/configuration/cmds/node.def b/templates/show/configuration/cmds/node.def deleted file mode 100644 index a2d55cf..0000000 --- a/templates/show/configuration/cmds/node.def +++ /dev/null @@ -1,7 +0,0 @@ -help: Show running configuration as set commands -run: if [ "$VYATTA_USER_LEVEL_DIR" == "/opt/vyatta/etc/shell/level/admin" ]; - then - ${vyatta_sbindir}/vyatta-config-gen-sets.pl - else - echo Must be an admin user to run this command. - fi diff --git a/templates/show/configuration/commands/node.def b/templates/show/configuration/commands/node.def new file mode 100644 index 0000000..a2d55cf --- /dev/null +++ b/templates/show/configuration/commands/node.def @@ -0,0 +1,7 @@ +help: Show running configuration as set commands +run: if [ "$VYATTA_USER_LEVEL_DIR" == "/opt/vyatta/etc/shell/level/admin" ]; + then + ${vyatta_sbindir}/vyatta-config-gen-sets.pl + else + echo Must be an admin user to run this command. + fi -- cgit v1.2.3 From f152f6c304caafbecaaf6719ecd1fa26bd613d5e Mon Sep 17 00:00:00 2001 From: Stig Thormodsrud Date: Mon, 22 Nov 2010 11:35:06 -0800 Subject: 0.13.93 --- debian/changelog | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/debian/changelog b/debian/changelog index c0260be..32cd058 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +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 Mon, 22 Nov 2010 11:35:05 -0800 + vyatta-op (0.13.92) unstable; urgency=low [ Stephen Hemminger ] -- cgit v1.2.3 From f9d661f8b251323d589218613899b7ed7a1456d6 Mon Sep 17 00:00:00 2001 From: Bob Gilligan Date: Sun, 21 Nov 2010 02:46:51 -0800 Subject: Allow admin users to disconnect PPP links. We need a sudo for admin users to be able to kill the "pon" processes that monitor individual "pppd" processes. --- templates/disconnect/interface/node.tag/node.def | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3 From be2abfc96e7a7c6340b40786acd84348da0c4c9a Mon Sep 17 00:00:00 2001 From: Bob Gilligan Date: Sun, 21 Nov 2010 02:48:16 -0800 Subject: 0.13.94 --- debian/changelog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index 32cd058..fc0b40b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +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 Sun, 21 Nov 2010 02:48:16 -0800 + vyatta-op (0.13.93) unstable; urgency=low [ Stephen Hemminger ] -- cgit v1.2.3 From 2c41bb3f894e44c2e5ecdbb2f65029534d4ed240 Mon Sep 17 00:00:00 2001 From: Bob Gilligan Date: Sun, 21 Nov 2010 05:11:31 -0800 Subject: Bugfix 6101: Add syslog record when a system image is re-named. --- scripts/rename-image.pl | 3 +++ 1 file changed, 3 insertions(+) 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 = ) { $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"); -- cgit v1.2.3 From d948cf425657cb34ad0f5bf1937ed9e8c24a17d2 Mon Sep 17 00:00:00 2001 From: Bob Gilligan Date: Sun, 21 Nov 2010 05:12:56 -0800 Subject: 0.13.95 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index fc0b40b..53a1b80 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +vyatta-op (0.13.95) unstable; urgency=low + + * Bugfix 6101: Add syslog record when a system image is re-named. + + -- Bob Gilligan 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. -- cgit v1.2.3 From 1e0f76993b5b8ae93470775f1857f4b02ff125c0 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Wed, 24 Nov 2010 08:21:45 -0800 Subject: Rename 10vyatta-op to vyatta-op Bug 6302 Rename vyatta-op completion script so it runs after others to avoid conflict with set alias. Other scripts after 'v' in alphabet do not use set. --- Makefile.am | 2 +- etc/bash_completion.d/10vyatta-op | 451 -------------------------------------- etc/bash_completion.d/vyatta-op | 451 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 452 insertions(+), 452 deletions(-) delete mode 100644 etc/bash_completion.d/10vyatta-op create mode 100644 etc/bash_completion.d/vyatta-op 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/etc/bash_completion.d/10vyatta-op b/etc/bash_completion.d/10vyatta-op deleted file mode 100644 index 6336038..0000000 --- a/etc/bash_completion.d/10vyatta-op +++ /dev/null @@ -1,451 +0,0 @@ - -# **** License **** -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License version 2 as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# This code was originally developed by Vyatta, Inc. -# Portions created by Vyatta are Copyright (C) 2006, 2007 Vyatta, Inc. -# All Rights Reserved. -# -# Author: Tom Grennan -# Date: 2007 -# Description: setup bash completion for Vyatta operational commands -# -# **** End License **** - -test -z "$_vyatta_less_options" && \ - declare -r _vyatta_less_options="\ - --QUIT-AT-EOF\ - --quit-if-one-screen\ - --RAW-CONTROL-CHARS\ - --squeeze-blank-lines\ - --no-init" -test -z "$_vyatta_default_pager" && \ - declare -r _vyatta_default_pager="less \ - --buffers=64\ - --auto-buffers\ - --no-lessopen\ - $_vyatta_less_options" -declare -x VYATTA_PAGER=$_vyatta_default_pager - -_vyatta_op_do_key_bindings () -{ - if [ "$SHELL" != "/bin/vbash" ]; then - # only do bindings if vbash - return - fi - - bind '"?": possible-completions' - bind 'set show-all-if-ambiguous on' - - nullglob_save=$(shopt -p nullglob) - shopt -u nullglob - bind_cmds=$(grep '^bind .* # vyatta key binding$' $HOME/.bashrc) - eval $bind_cmds - eval $nullglob_save -} - -_vyatta_op_do_key_bindings - -test -f /etc/default/vyatta && \ - source /etc/default/vyatta - -test ! -d "$vyatta_op_templates" && \ - return 0 - -declare -r _vyatta_op_last_comp_init='>>>>>>LASTCOMP<<<<<<' -declare _vyatta_op_last_comp=${_vyatta_op_last_comp_init} -declare _vyatta_op_node_path -declare -a _vyatta_op_noncompletions _vyatta_op_completions -declare -x -a _vyatta_pipe_noncompletions _vyatta_pipe_completions - -# $1: label -# #2...: strings -_vyatta_op_debug () -{ - echo -ne \\n$1: - shift - for s ; do - echo -ne " \"$s\"" - done -} - -_vyatta_op_init () -{ - complete -F _vyatta_op_expand '' - - for xd in $vyatta_op_templates/* ; do - if [ -d $xd ] ; then - cmd=${xd##*/} - complete -F _vyatta_op_expand $cmd - eval alias $cmd=\'_vyatta_op_run $cmd\' - fi - done - - shopt -s histverify -} - -_vyatta_op_get_node_def_field () -{ - local file=$1 field=$2 - - sed -n '/^'"$field"':/,$ { -# strip field name and hold rest of line - s/[a-z]*: *// - h - :b -# at EOF, print hold buffer and quit - $ { x; p; q } -# input next line - n -# if start of another field def, print hold buf and quit - /^[a-z]*:/ { x; p; q } -# add to hold buf and branch to input next line - H - bb - }' $file -} - -# $1: label -# $2...: help -_vyatta_op_print_help () -{ - local label=$1 help=$2 - - if [ ${#help} -eq 0 ] ; then - echo -ne "\n $label" - elif [ ${#label} -lt 6 ] ; then - echo -ne "\n $label\t\t$help" - elif [ ${#label} -lt 14 ] ; then - echo -ne "\n $label\t$help" - else - echo -ne "\n $label\n\t\t$help" - fi -} - -# $1: $cur -# $2...: possible completions -_vyatta_op_help () -{ - local cur=$1; shift - local ndef node_tag_help node_run help last_help - - ndef=${_vyatta_op_node_path}/node.tag/node.def - [ -f $ndef ] && \ - node_tag_help=$( _vyatta_op_get_node_def_field $ndef help ) - - ndef=${_vyatta_op_node_path}/node.def - [ -f $ndef ] && \ - node_run=$( _vyatta_op_get_node_def_field $ndef run ) - - echo -en "\nPossible completions:" - if [ -z "$cur" -a -n "$node_run" ]; then - _vyatta_op_print_help '' "Execute the current command" - fi - for comp ; do - if [ -z "$comp" ] ; then - if [ "X$node_tag_help" == "X$last_help" ] ; then - help="" - else - last_help=$node_tag_help - help=$node_tag_help - fi - _vyatta_op_print_help '*' "$help" - elif [[ -z "$cur" || $comp == ${cur}* ]] ; then - ndef=${_vyatta_op_node_path}/$comp/node.def - if [ -f $ndef ] ; then - help=$( _vyatta_op_get_node_def_field $ndef help ) - else - help=$node_tag_help - fi - if [ "X$help" == "X$last_help" ] ; then - help="" - else - last_help=$help - fi - _vyatta_op_print_help "$comp" "$help" - fi - done -} - -_vyatta_op_set_node_path () -{ - _vyatta_op_node_path=$vyatta_op_templates - for (( i=0 ; i or - _vyatta_op_noncompletions=( ) - completions=( ) - for (( i=0 ; i<${#allowed[@]} ; i++ )) ; do - if [[ "${allowed[i]}" == \<*\> ]] ; then - _vyatta_op_noncompletions+=( ${allowed[i]} ) - else - completions+=( ${allowed[i]} ) - fi - done - - _vyatta_op_completions=($( printf "%s\n" ${completions[@]} | sort -u )) -} - -_vyatta_op_comprely_needs_ambiguity () -{ - local -a uniq - - [ ${#COMPREPLY[@]} -eq 1 ] && return - - uniq=( `printf "%s\n" ${COMPREPLY[@]} | cut -c1 | sort -u` ) - - [ ${#uniq[@]} -eq 1 ] && return - false -} - -_vyatta_op_expand () -{ - local restore_shopts=$( shopt -p extglob nullglob | tr \\n \; ) - shopt -s extglob nullglob - local cur="" - - if (( ${#COMP_WORDS[@]} > 0 )); then - cur=${COMP_WORDS[COMP_CWORD]} - else - (( COMP_CWORD = ${#COMP_WORDS[@]} )) - fi - - if _vyatta_pipe_completion "${COMP_WORDS[@]}"; then - if [ "${COMP_WORDS[*]}" == "$_vyatta_op_last_comp" ] ; then - _vyatta_do_pipe_help - COMPREPLY=( "" " " ) - _vyatta_op_last_comp=${_vyatta_op_last_comp_init} - else - COMPREPLY=( "${_vyatta_pipe_completions[@]}" ) - _vyatta_op_last_comp="${COMP_WORDS[*]}" - fi - eval "$restore_shopts" - return - fi - - if [ "${COMP_WORDS[*]}" != "$_vyatta_op_last_comp" ] ; then - if ! _vyatta_op_set_node_path ; then - echo -e \\a - COMPREPLY=( "" " " ) - eval "$restore_shopts" - return 1 - fi - _vyatta_op_set_completions - fi - - COMPREPLY=($( compgen -W "${_vyatta_op_completions[*]}" -- $cur )) - - # if the last command line arg is empty and we have - # an empty completion option (meaning wild card), - # append a blank(s) to the completion array to force ambiguity - if [ -z "$cur" ] ; then - for comp ; do - if [ -z "$comp" ] ; then - if [ ${#COMPREPLY[@]} -eq 0 ] ; then - COMPREPLY+=( " " "" ) - elif _vyatta_op_comprely_needs_ambiguity ; then - COMPREPLY+=( " " ) - fi - fi - done - fi - - if [ "${COMP_WORDS[*]}" == "$_vyatta_op_last_comp" ] ; then - _vyatta_op_help "$cur" \ - ${_vyatta_op_noncompletions[@]} \ - ${_vyatta_op_completions[@]} \ - | ${VYATTA_PAGER:-cat} - COMPREPLY=( "" " " ) - _vyatta_op_last_comp=${_vyatta_op_last_comp_init} - else - _vyatta_op_last_comp="${COMP_WORDS[*]}" - fi - - eval "$restore_shopts" -} - -_vyatta_op_run () -{ - local -i estat - local tpath=$vyatta_op_templates - local restore_shopts=$( shopt -p extglob nullglob | tr \\n \; ) - shopt -s extglob nullglob - - _vyatta_op_last_comp=${_vyatta_op_last_comp_init} - false; estat=$? - - i=1 - for arg in "$@" - do - if [ -f "$tpath/$arg/node.def" ] ; then - tpath+=/$arg - elif [ -f $tpath/node.tag/node.def ] ; then - tpath+=/node.tag - else - echo "Invalid command" >&2 - eval $restore_shopts - return 1 - fi - let "i+=1" - done - - local run_cmd=$(_vyatta_op_get_node_def_field $tpath/node.def run) - local ret=0 - if [ -n "$run_cmd" ]; then - if [[ -t 1 && "$1" == "show" && \ - ! $run_cmd =~ ^\(LESSOPEN=\|less\|pager\|tail\|/opt/vyatta/bin/vyatta-tshark-interface-port.pl\).* ]] ; then - eval "($run_cmd) | ${VYATTA_PAGER:-cat}" - else - eval "$run_cmd" - fi - else - echo "Incomplete command" >&2 - ret=1 - fi - eval $restore_shopts - return $ret -} - -# "pipe" functions -count () -{ - wc -l -} - -match () -{ - grep -E -e "$1" -} - -no-match () -{ - grep -E -v -e "$1" -} - -no-more () -{ - cat -} - -# pipe command help -# $1: command -_vyatta_pipe_help () -{ - local help="No help text available" - case "$1" in - count) help="Count the number of lines in the output";; - match) help="Only output lines that match specified pattern";; - no-match) help="Only output lines that do not match specified pattern";; - more) help="Paginate the output";; - no-more) help="Do not paginate the output";; - '') help="Pattern for matching";; - esac - echo -n "$help" -} - -_vyatta_do_pipe_help () -{ - local help='' - if (( ${#_vyatta_pipe_completions[@]} + ${#_vyatta_pipe_noncompletions[@]} - == 0 )); then - return - fi - echo -en "\nPossible completions:" - for comp in "${_vyatta_pipe_completions[@]}" \ - "${_vyatta_pipe_noncompletions[@]}"; do - _vyatta_op_print_help "$comp" "$(_vyatta_pipe_help "$comp")" - done -} - -# pipe completion -# $@: words -_vyatta_pipe_completion () -{ - local -a pipe_cmd=() - local -a all_cmds=( 'count' 'match' 'no-match' 'more' 'no-more' ) - local found=0 - _vyatta_pipe_completions=() - _vyatta_pipe_noncompletions=() - - for word in "$@"; do - if [ "$found" == "1" -o "$word" == "|" ]; then - pipe_cmd+=( "$word" ) - found=1 - fi - done - if (( found == 0 )); then - return 1 - fi - if (( ${#pipe_cmd[@]} == 1 )); then - # "|" only - _vyatta_pipe_completions=( "${all_cmds[@]}" ) - return 0 - fi - if (( ${#pipe_cmd[@]} == 2 )); then - # "|" - _vyatta_pipe_completions=($(compgen -W "${all_cmds[*]}" -- ${pipe_cmd[1]})) - return 0 - fi - if (( ${#pipe_cmd[@]} == 3 )); then - # "|" - case "${pipe_cmd[1]}" in - match|no-match) _vyatta_pipe_noncompletions=( '' );; - esac - return 0 - fi - return 0 -} - -nullglob_save=$( shopt -p nullglob ) -shopt -s nullglob -for f in ${vyatta_datadir}/vyatta-op/functions/allowed/* ; do - source $f -done -eval $nullglob_save -unset nullglob_save - -# don't initialize if we are in configure mode -if [ "$_OFR_CONFIGURE" == "ok" ]; then - return 0 -fi - -_vyatta_op_init $@ - -### Local Variables: -### mode: shell-script -### End: diff --git a/etc/bash_completion.d/vyatta-op b/etc/bash_completion.d/vyatta-op new file mode 100644 index 0000000..6336038 --- /dev/null +++ b/etc/bash_completion.d/vyatta-op @@ -0,0 +1,451 @@ + +# **** License **** +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 2 as +# published by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# This code was originally developed by Vyatta, Inc. +# Portions created by Vyatta are Copyright (C) 2006, 2007 Vyatta, Inc. +# All Rights Reserved. +# +# Author: Tom Grennan +# Date: 2007 +# Description: setup bash completion for Vyatta operational commands +# +# **** End License **** + +test -z "$_vyatta_less_options" && \ + declare -r _vyatta_less_options="\ + --QUIT-AT-EOF\ + --quit-if-one-screen\ + --RAW-CONTROL-CHARS\ + --squeeze-blank-lines\ + --no-init" +test -z "$_vyatta_default_pager" && \ + declare -r _vyatta_default_pager="less \ + --buffers=64\ + --auto-buffers\ + --no-lessopen\ + $_vyatta_less_options" +declare -x VYATTA_PAGER=$_vyatta_default_pager + +_vyatta_op_do_key_bindings () +{ + if [ "$SHELL" != "/bin/vbash" ]; then + # only do bindings if vbash + return + fi + + bind '"?": possible-completions' + bind 'set show-all-if-ambiguous on' + + nullglob_save=$(shopt -p nullglob) + shopt -u nullglob + bind_cmds=$(grep '^bind .* # vyatta key binding$' $HOME/.bashrc) + eval $bind_cmds + eval $nullglob_save +} + +_vyatta_op_do_key_bindings + +test -f /etc/default/vyatta && \ + source /etc/default/vyatta + +test ! -d "$vyatta_op_templates" && \ + return 0 + +declare -r _vyatta_op_last_comp_init='>>>>>>LASTCOMP<<<<<<' +declare _vyatta_op_last_comp=${_vyatta_op_last_comp_init} +declare _vyatta_op_node_path +declare -a _vyatta_op_noncompletions _vyatta_op_completions +declare -x -a _vyatta_pipe_noncompletions _vyatta_pipe_completions + +# $1: label +# #2...: strings +_vyatta_op_debug () +{ + echo -ne \\n$1: + shift + for s ; do + echo -ne " \"$s\"" + done +} + +_vyatta_op_init () +{ + complete -F _vyatta_op_expand '' + + for xd in $vyatta_op_templates/* ; do + if [ -d $xd ] ; then + cmd=${xd##*/} + complete -F _vyatta_op_expand $cmd + eval alias $cmd=\'_vyatta_op_run $cmd\' + fi + done + + shopt -s histverify +} + +_vyatta_op_get_node_def_field () +{ + local file=$1 field=$2 + + sed -n '/^'"$field"':/,$ { +# strip field name and hold rest of line + s/[a-z]*: *// + h + :b +# at EOF, print hold buffer and quit + $ { x; p; q } +# input next line + n +# if start of another field def, print hold buf and quit + /^[a-z]*:/ { x; p; q } +# add to hold buf and branch to input next line + H + bb + }' $file +} + +# $1: label +# $2...: help +_vyatta_op_print_help () +{ + local label=$1 help=$2 + + if [ ${#help} -eq 0 ] ; then + echo -ne "\n $label" + elif [ ${#label} -lt 6 ] ; then + echo -ne "\n $label\t\t$help" + elif [ ${#label} -lt 14 ] ; then + echo -ne "\n $label\t$help" + else + echo -ne "\n $label\n\t\t$help" + fi +} + +# $1: $cur +# $2...: possible completions +_vyatta_op_help () +{ + local cur=$1; shift + local ndef node_tag_help node_run help last_help + + ndef=${_vyatta_op_node_path}/node.tag/node.def + [ -f $ndef ] && \ + node_tag_help=$( _vyatta_op_get_node_def_field $ndef help ) + + ndef=${_vyatta_op_node_path}/node.def + [ -f $ndef ] && \ + node_run=$( _vyatta_op_get_node_def_field $ndef run ) + + echo -en "\nPossible completions:" + if [ -z "$cur" -a -n "$node_run" ]; then + _vyatta_op_print_help '' "Execute the current command" + fi + for comp ; do + if [ -z "$comp" ] ; then + if [ "X$node_tag_help" == "X$last_help" ] ; then + help="" + else + last_help=$node_tag_help + help=$node_tag_help + fi + _vyatta_op_print_help '*' "$help" + elif [[ -z "$cur" || $comp == ${cur}* ]] ; then + ndef=${_vyatta_op_node_path}/$comp/node.def + if [ -f $ndef ] ; then + help=$( _vyatta_op_get_node_def_field $ndef help ) + else + help=$node_tag_help + fi + if [ "X$help" == "X$last_help" ] ; then + help="" + else + last_help=$help + fi + _vyatta_op_print_help "$comp" "$help" + fi + done +} + +_vyatta_op_set_node_path () +{ + _vyatta_op_node_path=$vyatta_op_templates + for (( i=0 ; i or + _vyatta_op_noncompletions=( ) + completions=( ) + for (( i=0 ; i<${#allowed[@]} ; i++ )) ; do + if [[ "${allowed[i]}" == \<*\> ]] ; then + _vyatta_op_noncompletions+=( ${allowed[i]} ) + else + completions+=( ${allowed[i]} ) + fi + done + + _vyatta_op_completions=($( printf "%s\n" ${completions[@]} | sort -u )) +} + +_vyatta_op_comprely_needs_ambiguity () +{ + local -a uniq + + [ ${#COMPREPLY[@]} -eq 1 ] && return + + uniq=( `printf "%s\n" ${COMPREPLY[@]} | cut -c1 | sort -u` ) + + [ ${#uniq[@]} -eq 1 ] && return + false +} + +_vyatta_op_expand () +{ + local restore_shopts=$( shopt -p extglob nullglob | tr \\n \; ) + shopt -s extglob nullglob + local cur="" + + if (( ${#COMP_WORDS[@]} > 0 )); then + cur=${COMP_WORDS[COMP_CWORD]} + else + (( COMP_CWORD = ${#COMP_WORDS[@]} )) + fi + + if _vyatta_pipe_completion "${COMP_WORDS[@]}"; then + if [ "${COMP_WORDS[*]}" == "$_vyatta_op_last_comp" ] ; then + _vyatta_do_pipe_help + COMPREPLY=( "" " " ) + _vyatta_op_last_comp=${_vyatta_op_last_comp_init} + else + COMPREPLY=( "${_vyatta_pipe_completions[@]}" ) + _vyatta_op_last_comp="${COMP_WORDS[*]}" + fi + eval "$restore_shopts" + return + fi + + if [ "${COMP_WORDS[*]}" != "$_vyatta_op_last_comp" ] ; then + if ! _vyatta_op_set_node_path ; then + echo -e \\a + COMPREPLY=( "" " " ) + eval "$restore_shopts" + return 1 + fi + _vyatta_op_set_completions + fi + + COMPREPLY=($( compgen -W "${_vyatta_op_completions[*]}" -- $cur )) + + # if the last command line arg is empty and we have + # an empty completion option (meaning wild card), + # append a blank(s) to the completion array to force ambiguity + if [ -z "$cur" ] ; then + for comp ; do + if [ -z "$comp" ] ; then + if [ ${#COMPREPLY[@]} -eq 0 ] ; then + COMPREPLY+=( " " "" ) + elif _vyatta_op_comprely_needs_ambiguity ; then + COMPREPLY+=( " " ) + fi + fi + done + fi + + if [ "${COMP_WORDS[*]}" == "$_vyatta_op_last_comp" ] ; then + _vyatta_op_help "$cur" \ + ${_vyatta_op_noncompletions[@]} \ + ${_vyatta_op_completions[@]} \ + | ${VYATTA_PAGER:-cat} + COMPREPLY=( "" " " ) + _vyatta_op_last_comp=${_vyatta_op_last_comp_init} + else + _vyatta_op_last_comp="${COMP_WORDS[*]}" + fi + + eval "$restore_shopts" +} + +_vyatta_op_run () +{ + local -i estat + local tpath=$vyatta_op_templates + local restore_shopts=$( shopt -p extglob nullglob | tr \\n \; ) + shopt -s extglob nullglob + + _vyatta_op_last_comp=${_vyatta_op_last_comp_init} + false; estat=$? + + i=1 + for arg in "$@" + do + if [ -f "$tpath/$arg/node.def" ] ; then + tpath+=/$arg + elif [ -f $tpath/node.tag/node.def ] ; then + tpath+=/node.tag + else + echo "Invalid command" >&2 + eval $restore_shopts + return 1 + fi + let "i+=1" + done + + local run_cmd=$(_vyatta_op_get_node_def_field $tpath/node.def run) + local ret=0 + if [ -n "$run_cmd" ]; then + if [[ -t 1 && "$1" == "show" && \ + ! $run_cmd =~ ^\(LESSOPEN=\|less\|pager\|tail\|/opt/vyatta/bin/vyatta-tshark-interface-port.pl\).* ]] ; then + eval "($run_cmd) | ${VYATTA_PAGER:-cat}" + else + eval "$run_cmd" + fi + else + echo "Incomplete command" >&2 + ret=1 + fi + eval $restore_shopts + return $ret +} + +# "pipe" functions +count () +{ + wc -l +} + +match () +{ + grep -E -e "$1" +} + +no-match () +{ + grep -E -v -e "$1" +} + +no-more () +{ + cat +} + +# pipe command help +# $1: command +_vyatta_pipe_help () +{ + local help="No help text available" + case "$1" in + count) help="Count the number of lines in the output";; + match) help="Only output lines that match specified pattern";; + no-match) help="Only output lines that do not match specified pattern";; + more) help="Paginate the output";; + no-more) help="Do not paginate the output";; + '') help="Pattern for matching";; + esac + echo -n "$help" +} + +_vyatta_do_pipe_help () +{ + local help='' + if (( ${#_vyatta_pipe_completions[@]} + ${#_vyatta_pipe_noncompletions[@]} + == 0 )); then + return + fi + echo -en "\nPossible completions:" + for comp in "${_vyatta_pipe_completions[@]}" \ + "${_vyatta_pipe_noncompletions[@]}"; do + _vyatta_op_print_help "$comp" "$(_vyatta_pipe_help "$comp")" + done +} + +# pipe completion +# $@: words +_vyatta_pipe_completion () +{ + local -a pipe_cmd=() + local -a all_cmds=( 'count' 'match' 'no-match' 'more' 'no-more' ) + local found=0 + _vyatta_pipe_completions=() + _vyatta_pipe_noncompletions=() + + for word in "$@"; do + if [ "$found" == "1" -o "$word" == "|" ]; then + pipe_cmd+=( "$word" ) + found=1 + fi + done + if (( found == 0 )); then + return 1 + fi + if (( ${#pipe_cmd[@]} == 1 )); then + # "|" only + _vyatta_pipe_completions=( "${all_cmds[@]}" ) + return 0 + fi + if (( ${#pipe_cmd[@]} == 2 )); then + # "|" + _vyatta_pipe_completions=($(compgen -W "${all_cmds[*]}" -- ${pipe_cmd[1]})) + return 0 + fi + if (( ${#pipe_cmd[@]} == 3 )); then + # "|" + case "${pipe_cmd[1]}" in + match|no-match) _vyatta_pipe_noncompletions=( '' );; + esac + return 0 + fi + return 0 +} + +nullglob_save=$( shopt -p nullglob ) +shopt -s nullglob +for f in ${vyatta_datadir}/vyatta-op/functions/allowed/* ; do + source $f +done +eval $nullglob_save +unset nullglob_save + +# don't initialize if we are in configure mode +if [ "$_OFR_CONFIGURE" == "ok" ]; then + return 0 +fi + +_vyatta_op_init $@ + +### Local Variables: +### mode: shell-script +### End: -- cgit v1.2.3 From 20a16cd27ecf3832770cca619b862ae9a096b0eb Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Wed, 24 Nov 2010 10:49:31 -0800 Subject: 0.13.96 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 53a1b80..120edc2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +vyatta-op (0.13.96) unstable; urgency=low + + * Rename 10vyatta-op to vyatta-op + + -- Stephen Hemminger 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. -- cgit v1.2.3 From 9c075f1069aa4add55e0cd7dc4ecccc2101c540a Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 30 Nov 2010 20:39:47 -0800 Subject: Use new bash completion for empty command Bug 6401 Use the new bash 4.1 completion for empty top level command --- debian/control | 2 +- etc/bash_completion.d/vyatta-op | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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/etc/bash_completion.d/vyatta-op b/etc/bash_completion.d/vyatta-op index 6336038..32904a2 100644 --- a/etc/bash_completion.d/vyatta-op +++ b/etc/bash_completion.d/vyatta-op @@ -78,7 +78,7 @@ _vyatta_op_debug () _vyatta_op_init () { - complete -F _vyatta_op_expand '' + complete -E -F _vyatta_op_expand for xd in $vyatta_op_templates/* ; do if [ -d $xd ] ; then -- cgit v1.2.3 From 479c7021e19e16f74c9aff7d0f4d5d9df15458a1 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 30 Nov 2010 20:46:18 -0800 Subject: 0.13.97 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 120edc2..612679c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +vyatta-op (0.13.97) unstable; urgency=low + + * Use new bash completion for empty command + + -- Stephen Hemminger Tue, 30 Nov 2010 20:46:17 -0800 + vyatta-op (0.13.96) unstable; urgency=low * Rename 10vyatta-op to vyatta-op -- cgit v1.2.3 From 4de2df295d7b56c04859eaebaf64e27720612d9c Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Wed, 1 Dec 2010 08:59:04 -0800 Subject: Add default command completion This fixes the case of $se --- etc/bash_completion.d/vyatta-op | 3 +++ 1 file changed, 3 insertions(+) diff --git a/etc/bash_completion.d/vyatta-op b/etc/bash_completion.d/vyatta-op index 32904a2..06cb03a 100644 --- a/etc/bash_completion.d/vyatta-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 @@ -78,7 +79,9 @@ _vyatta_op_debug () _vyatta_op_init () { + # empty and default line compeletion complete -E -F _vyatta_op_expand + complete -D -F _vyatta_op_expand for xd in $vyatta_op_templates/* ; do if [ -d $xd ] ; then -- cgit v1.2.3 From 52973bdd8268a8fee45ffd1ff190f5c56388a105 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Wed, 1 Dec 2010 09:09:16 -0800 Subject: 0.13.98 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 612679c..9c2b381 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +vyatta-op (0.13.98) unstable; urgency=low + + * Add default command completion + + -- Stephen Hemminger Wed, 01 Dec 2010 09:09:16 -0800 + vyatta-op (0.13.97) unstable; urgency=low * Use new bash completion for empty command -- cgit v1.2.3 From 6ea23545e73c135b1ce67fa7fb63b998672ac282 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 7 Dec 2010 10:23:48 -0800 Subject: Add show system memory detail Bug 5704 --- templates/show/system/memory/detail/node.def | 2 ++ templates/show/system/memory/node.def | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 templates/show/system/memory/detail/node.def 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 -- cgit v1.2.3 From 3cb7388696d9473afebfbb097967ac8c865c203c Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 7 Dec 2010 11:00:20 -0800 Subject: Add more options to show system processes Bug 1615 --- templates/show/system/processes/extensive/node.def | 2 ++ templates/show/system/processes/tree/node.def | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 templates/show/system/processes/extensive/node.def create mode 100644 templates/show/system/processes/tree/node.def 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 -- cgit v1.2.3 From ffa8809a4cdda655cc8e731dca7c6a95d49e931e Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 7 Dec 2010 11:06:43 -0800 Subject: Add show system memory cache This provides information requested in Bug 515 --- templates/show/system/memory/cache/node.def | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 templates/show/system/memory/cache/node.def 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 -- cgit v1.2.3 From 1d607f20586703e8116ec105be68595db3e2f467 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 7 Dec 2010 11:10:11 -0800 Subject: 0.13.99 --- debian/changelog | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/debian/changelog b/debian/changelog index 9c2b381..3683e7f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +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 Tue, 07 Dec 2010 11:10:11 -0800 + vyatta-op (0.13.98) unstable; urgency=low * Add default command completion -- cgit v1.2.3 From 240da11791724d0e252fa3263e56ad916210de60 Mon Sep 17 00:00:00 2001 From: An-Cheng Huang Date: Tue, 14 Dec 2010 18:40:37 -0800 Subject: provide default filename completion --- etc/bash_completion.d/vyatta-op | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/etc/bash_completion.d/vyatta-op b/etc/bash_completion.d/vyatta-op index 06cb03a..49b6768 100644 --- a/etc/bash_completion.d/vyatta-op +++ b/etc/bash_completion.d/vyatta-op @@ -77,11 +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 () { # empty and default line compeletion complete -E -F _vyatta_op_expand - complete -D -F _vyatta_op_expand + complete -D -F _vyatta_op_default_expand for xd in $vyatta_op_templates/* ; do if [ -d $xd ] ; then -- cgit v1.2.3 From 939b988d4bfec8af8bae49e491bcb513c3ed2c35 Mon Sep 17 00:00:00 2001 From: An-Cheng Huang Date: Tue, 21 Dec 2010 11:28:22 -0800 Subject: 0.13.100 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 3683e7f..7dcac3b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +vyatta-op (0.13.100) unstable; urgency=low + + * provide default filename completion + + -- An-Cheng Huang Tue, 21 Dec 2010 11:28:22 -0800 + vyatta-op (0.13.99) unstable; urgency=low * Add show system memory detail -- cgit v1.2.3 From 2802d48a1e90e16c9b0f5a8923434091d27fc44a Mon Sep 17 00:00:00 2001 From: An-Cheng Huang Date: Tue, 28 Dec 2010 20:39:34 +0000 Subject: new branch --- .frlog | 1 + 1 file changed, 1 insertion(+) create mode 100644 .frlog 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] -- cgit v1.2.3 From 34d0683a3763f172cdf18df245b26fbd756a7ca9 Mon Sep 17 00:00:00 2001 From: An-Cheng Huang Date: Tue, 28 Dec 2010 20:39:36 +0000 Subject: 0.13.100+mendocino1 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 7dcac3b..dcefade 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +vyatta-op (0.13.100+mendocino1) unstable; urgency=low + + * new branch + + -- An-Cheng Huang Tue, 28 Dec 2010 20:39:36 +0000 + vyatta-op (0.13.100) unstable; urgency=low * provide default filename completion -- cgit v1.2.3 From 6a0dfdb405bb0f2103b0a290ec377b5a831372de Mon Sep 17 00:00:00 2001 From: An-Cheng Huang Date: Thu, 20 Jan 2011 18:21:59 -0800 Subject: don't use conffiles (not the vyatta way) --- debian/lintian | 1 + debian/rules | 1 + 2 files changed, 2 insertions(+) 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 \ -- cgit v1.2.3 From 9fb4fcd4c4509772cd36bb9f547b544ec3b91cda Mon Sep 17 00:00:00 2001 From: An-Cheng Huang Date: Thu, 20 Jan 2011 18:23:36 -0800 Subject: correctly handle renamed file --- debian/vyatta-op.postinst.in | 4 ++++ 1 file changed, 4 insertions(+) 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 + -- cgit v1.2.3 From 73dfd3113cfb1226366023ef61cae7c870b6159f Mon Sep 17 00:00:00 2001 From: An-Cheng Huang Date: Thu, 20 Jan 2011 18:24:03 -0800 Subject: 0.13.100+mendocino2 --- debian/changelog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index dcefade..bb437d4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +vyatta-op (0.13.100+mendocino2) unstable; urgency=low + + * don't use conffiles (not the vyatta way) + * correctly handle renamed file + + -- An-Cheng Huang Thu, 20 Jan 2011 18:24:03 -0800 + vyatta-op (0.13.100+mendocino1) unstable; urgency=low * new branch -- cgit v1.2.3