From ef55a6cb59439360f40a68848618be9ab1519748 Mon Sep 17 00:00:00 2001 From: rbalocca Date: Wed, 5 Mar 2008 12:45:18 -0800 Subject: Add VPL to scripts and fix lintian errors --- etc/bash_completion.d/20vyatta-cfg | 2 ++ 1 file changed, 2 insertions(+) mode change 100644 => 100755 etc/bash_completion.d/20vyatta-cfg (limited to 'etc') diff --git a/etc/bash_completion.d/20vyatta-cfg b/etc/bash_completion.d/20vyatta-cfg old mode 100644 new mode 100755 index 5966e18..e2a9261 --- a/etc/bash_completion.d/20vyatta-cfg +++ b/etc/bash_completion.d/20vyatta-cfg @@ -1,3 +1,5 @@ +#!/bin/sh + # **** License **** # Version: VPL 1.0 # -- cgit v1.2.3 From ff536782d33a0d2072aa93f93aaaddccd7cc2ba8 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Mon, 10 Mar 2008 11:08:52 -0700 Subject: Convert from VPL 1.0 to GPLv2 Glendale release is licensed under GPL version 2. --- debian/copyright | 31 ++++++++++++++++--------------- etc/bash_completion.d/20vyatta-cfg | 29 ++++++++++++++--------------- etc/init.d/vyatta-ofr | 28 ++++++++++++++-------------- scripts/VyattaConfigDOMTree.pm | 24 ++++++++++++++---------- scripts/VyattaMisc.pm | 24 ++++++++++++++---------- scripts/vyatta-interfaces.pl | 24 ++++++++++++++---------- scripts/vyatta-irqaffin | 24 ++++++++++++++---------- src/cli_path_utils.c | 26 +++++++++++++++----------- src/cli_path_utils.h | 26 +++++++++++++++----------- src/cli_val_engine.c | 26 +++++++++++++++----------- src/cli_val_engine.h | 26 +++++++++++++++----------- 11 files changed, 160 insertions(+), 128 deletions(-) (limited to 'etc') diff --git a/debian/copyright b/debian/copyright index 4c6e7e6..b7da607 100644 --- a/debian/copyright +++ b/debian/copyright @@ -14,21 +14,22 @@ Copyright: License: - The contents of this package are subject to the Vyatta Public License - Version 1.0 ("License"); you may not use this file except in - compliance with the License. You may obtain a copy of the License at - http://www.vyatta.com/vpl - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and limitations - under the License. - - This code was originally developed by Vyatta, Inc. - Portions created by Vyatta are Copyright (C) 2007 Vyatta, Inc. - -On Debian systems, the complete text of the GNU General -Public License can be found in `/usr/share/common-licenses/GPL'. +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +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. + +A copy of the GNU General Public License is available as +`/usr/share/common-licenses/GPL' in the Debian GNU/Linux distribution +or on the World Wide Web at `http://www.gnu.org/copyleft/gpl.html'. +You can also obtain it by writing to the Free Software Foundation, +Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +MA 02110-1301, USA. The Debian packaging is (C) 2007, An-Cheng Huang and is licensed under the GPL, see above. diff --git a/etc/bash_completion.d/20vyatta-cfg b/etc/bash_completion.d/20vyatta-cfg index 5966e18..5c683f4 100644 --- a/etc/bash_completion.d/20vyatta-cfg +++ b/etc/bash_completion.d/20vyatta-cfg @@ -1,22 +1,21 @@ # **** License **** -# Version: VPL 1.0 +# 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. # -# The contents of this file are subject to the Vyatta Public License -# Version 1.0 ("License"); you may not use this file except in -# compliance with the License. You may obtain a copy of the License at -# http://www.vyatta.com/vpl -# -# Software distributed under the License is distributed on an "AS IS" -# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -# the License for the specific language governing rights and limitations -# under the License. -# -# This code was originally developed by Vyatta, Inc. -# Portions created by Vyatta are Copyright (C) 2006, 2007 Vyatta, Inc. -# All Rights Reserved. +# 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. +# +# A copy of the GNU General Public License is available as +# `/usr/share/common-licenses/GPL' in the Debian GNU/Linux distribution +# or on the World Wide Web at `http://www.gnu.org/copyleft/gpl.html'. +# You can also obtain it by writing to the Free Software Foundation, +# Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. # # Author: An-Cheng Huang -# Date: 2007 # Description: bash completion for Vyatta configuration commands # # **** End License **** diff --git a/etc/init.d/vyatta-ofr b/etc/init.d/vyatta-ofr index 89914c4..b1e7a69 100755 --- a/etc/init.d/vyatta-ofr +++ b/etc/init.d/vyatta-ofr @@ -9,21 +9,21 @@ # Description: Debian init script for the Vyatta Router ### END INIT INFO # **** License **** -# Version: VPL 1.0 +# 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. # -# The contents of this file are subject to the Vyatta Public License -# Version 1.0 ("License"); you may not use this file except in -# compliance with the License. You may obtain a copy of the License at -# http://www.vyatta.com/vpl -# -# Software distributed under the License is distributed on an "AS IS" -# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -# the License for the specific language governing rights and limitations -# under the License. -# -# This code was originally developed by Vyatta, Inc. -# Portions created by Vyatta are Copyright (C) 2007 Vyatta, Inc. -# All Rights Reserved. +# A copy of the GNU General Public License is available as +# `/usr/share/common-licenses/GPL' in the Debian GNU/Linux distribution +# or on the World Wide Web at `http://www.gnu.org/copyleft/gpl.html'. +# You can also obtain it by writing to the Free Software Foundation, +# Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. # # Author: Tom Grennan # **** End License **** diff --git a/scripts/VyattaConfigDOMTree.pm b/scripts/VyattaConfigDOMTree.pm index 86aabf8..68b58bb 100644 --- a/scripts/VyattaConfigDOMTree.pm +++ b/scripts/VyattaConfigDOMTree.pm @@ -2,17 +2,21 @@ # Module: serial # # **** License **** -# Version: VPL 1.0 +# 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. # -# The contents of this file are subject to the Vyatta Public License -# Version 1.0 ("License"); you may not use this file except in -# compliance with the License. You may obtain a copy of the License at -# http://www.vyatta.com/vpl -# -# Software distributed under the License is distributed on an "AS IS" -# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -# the License for the specific language governing rights and limitations -# under the License. +# A copy of the GNU General Public License is available as +# `/usr/share/common-licenses/GPL' in the Debian GNU/Linux distribution +# or on the World Wide Web at `http://www.gnu.org/copyleft/gpl.html'. +# You can also obtain it by writing to the Free Software Foundation, +# Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. # # This code was originally developed by Vyatta, Inc. # Portions created by Vyatta are Copyright (C) 2005, 2006, 2007 Vyatta, Inc. diff --git a/scripts/VyattaMisc.pm b/scripts/VyattaMisc.pm index 3a083ec..e81852f 100755 --- a/scripts/VyattaMisc.pm +++ b/scripts/VyattaMisc.pm @@ -2,17 +2,21 @@ # Module: VyattaMisc.pm # # **** License **** -# Version: VPL 1.0 +# 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. # -# The contents of this file are subject to the Vyatta Public License -# Version 1.0 ("License"); you may not use this file except in -# compliance with the License. You may obtain a copy of the License at -# http://www.vyatta.com/vpl -# -# Software distributed under the License is distributed on an "AS IS" -# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -# the License for the specific language governing rights and limitations -# under the License. +# A copy of the GNU General Public License is available as +# `/usr/share/common-licenses/GPL' in the Debian GNU/Linux distribution +# or on the World Wide Web at `http://www.gnu.org/copyleft/gpl.html'. +# You can also obtain it by writing to the Free Software Foundation, +# Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. # # This code was originally developed by Vyatta, Inc. # Portions created by Vyatta are Copyright (C) 2005, 2006, 2007 Vyatta, Inc. diff --git a/scripts/vyatta-interfaces.pl b/scripts/vyatta-interfaces.pl index 482faa8..1cad719 100644 --- a/scripts/vyatta-interfaces.pl +++ b/scripts/vyatta-interfaces.pl @@ -3,17 +3,21 @@ # Module: vyatta-interfaces.pl # # **** License **** -# Version: VPL 1.0 +# 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. # -# The contents of this file are subject to the Vyatta Public License -# Version 1.0 ("License"); you may not use this file except in -# compliance with the License. You may obtain a copy of the License at -# http://www.vyatta.com/vpl -# -# Software distributed under the License is distributed on an "AS IS" -# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -# the License for the specific language governing rights and limitations -# under the License. +# 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. +# +# A copy of the GNU General Public License is available as +# `/usr/share/common-licenses/GPL' in the Debian GNU/Linux distribution +# or on the World Wide Web at `http://www.gnu.org/copyleft/gpl.html'. +# You can also obtain it by writing to the Free Software Foundation, +# Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. # # This code was originally developed by Vyatta, Inc. # Portions created by Vyatta are Copyright (C) 2007 Vyatta, Inc. diff --git a/scripts/vyatta-irqaffin b/scripts/vyatta-irqaffin index 8be98b2..91cf082 100644 --- a/scripts/vyatta-irqaffin +++ b/scripts/vyatta-irqaffin @@ -2,17 +2,21 @@ #!/bin/bash # # **** License **** -# Version: VPL 1.0 +# 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. # -# The contents of this file are subject to the Vyatta Public License -# Version 1.0 ("License"); you may not use this file except in -# compliance with the License. You may obtain a copy of the License at -# http://www.vyatta.com/vpl -# -# Software distributed under the License is distributed on an "AS IS" -# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -# the License for the specific language governing rights and limitations -# under the License. +# A copy of the GNU General Public License is available as +# `/usr/share/common-licenses/GPL' in the Debian GNU/Linux distribution +# or on the World Wide Web at `http://www.gnu.org/copyleft/gpl.html'. +# You can also obtain it by writing to the Free Software Foundation, +# Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. # # This code was originally developed by Vyatta, Inc. # Portions created by Vyatta are Copyright (C) 2008 Vyatta, Inc. diff --git a/src/cli_path_utils.c b/src/cli_path_utils.c index 84a2bc0..642b5ae 100644 --- a/src/cli_path_utils.c +++ b/src/cli_path_utils.c @@ -4,17 +4,21 @@ Module: cli **** License **** - Version: VPL 1.0 - - The contents of this file are subject to the Vyatta Public License - Version 1.0 ("License"); you may not use this file except in - compliance with the License. You may obtain a copy of the License at - http://www.vyatta.com/vpl - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and limitations - under the 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. + + A copy of the GNU General Public License is available as + `/usr/share/common-licenses/GPL' in the Debian GNU/Linux distribution + or on the World Wide Web at `http://www.gnu.org/copyleft/gpl.html'. + You can also obtain it by writing to the Free Software Foundation, + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301, USA. This code was originally developed by Vyatta, Inc. Portions created by Vyatta are Copyright (C) 2007 Vyatta, Inc. diff --git a/src/cli_path_utils.h b/src/cli_path_utils.h index 6cc3be8..6716b22 100644 --- a/src/cli_path_utils.h +++ b/src/cli_path_utils.h @@ -4,17 +4,21 @@ Module: cli **** License **** - Version: VPL 1.0 - - The contents of this file are subject to the Vyatta Public License - Version 1.0 ("License"); you may not use this file except in - compliance with the License. You may obtain a copy of the License at - http://www.vyatta.com/vpl - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and limitations - under the 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. + + A copy of the GNU General Public License is available as + `/usr/share/common-licenses/GPL' in the Debian GNU/Linux distribution + or on the World Wide Web at `http://www.gnu.org/copyleft/gpl.html'. + You can also obtain it by writing to the Free Software Foundation, + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301, USA. This code was originally developed by Vyatta, Inc. Portions created by Vyatta are Copyright (C) 2007 Vyatta, Inc. diff --git a/src/cli_val_engine.c b/src/cli_val_engine.c index 50a02df..adf40a4 100644 --- a/src/cli_val_engine.c +++ b/src/cli_val_engine.c @@ -4,17 +4,21 @@ Module: cli **** License **** - Version: VPL 1.0 - - The contents of this file are subject to the Vyatta Public License - Version 1.0 ("License"); you may not use this file except in - compliance with the License. You may obtain a copy of the License at - http://www.vyatta.com/vpl - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and limitations - under the 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. + + A copy of the GNU General Public License is available as + `/usr/share/common-licenses/GPL' in the Debian GNU/Linux distribution + or on the World Wide Web at `http://www.gnu.org/copyleft/gpl.html'. + You can also obtain it by writing to the Free Software Foundation, + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301, USA. This code was originally developed by Vyatta, Inc. Portions created by Vyatta are Copyright (C) 2007 Vyatta, Inc. diff --git a/src/cli_val_engine.h b/src/cli_val_engine.h index 0f32276..6315dac 100644 --- a/src/cli_val_engine.h +++ b/src/cli_val_engine.h @@ -4,17 +4,21 @@ Module: cli **** License **** - Version: VPL 1.0 - - The contents of this file are subject to the Vyatta Public License - Version 1.0 ("License"); you may not use this file except in - compliance with the License. You may obtain a copy of the License at - http://www.vyatta.com/vpl - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and limitations - under the 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. + + A copy of the GNU General Public License is available as + `/usr/share/common-licenses/GPL' in the Debian GNU/Linux distribution + or on the World Wide Web at `http://www.gnu.org/copyleft/gpl.html'. + You can also obtain it by writing to the Free Software Foundation, + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301, USA. This code was originally developed by Vyatta, Inc. Portions created by Vyatta are Copyright (C) 2007 Vyatta, Inc. -- cgit v1.2.3 From 9cb73b42bf97b3978c34290825a715b6400536bc Mon Sep 17 00:00:00 2001 From: An-Cheng Huang Date: Tue, 11 Mar 2008 23:38:11 -0700 Subject: add LESSSECURE --- etc/default/vyatta-cfg | 1 + 1 file changed, 1 insertion(+) (limited to 'etc') diff --git a/etc/default/vyatta-cfg b/etc/default/vyatta-cfg index ef02233..d801239 100644 --- a/etc/default/vyatta-cfg +++ b/etc/default/vyatta-cfg @@ -43,6 +43,7 @@ if [ $is_admin == 1 ]; then else # no need to check is_users since there are only 2 levels for now declare -x -r VYATTA_USER_LEVEL_DIR=${vyatta_sysconfdir}/shell/level/users + declare -x -r LESSSECURE=1 fi } 2>/dev/null || : -- cgit v1.2.3 From ee9178c72e1fff0eff2932297f039eb0345f26b1 Mon Sep 17 00:00:00 2001 From: An-Cheng Huang Date: Wed, 12 Mar 2008 14:43:24 -0700 Subject: partial fix for bug 2987: use "less" instead of "more", and disable "terminal" command for operator level. --- etc/default/vyatta-cfg | 1 + etc/shell/level/users/allowed-op | 1 - etc/shell/level/users/allowed-pipe | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) (limited to 'etc') diff --git a/etc/default/vyatta-cfg b/etc/default/vyatta-cfg index d801239..7d189d8 100644 --- a/etc/default/vyatta-cfg +++ b/etc/default/vyatta-cfg @@ -44,6 +44,7 @@ else # no need to check is_users since there are only 2 levels for now declare -x -r VYATTA_USER_LEVEL_DIR=${vyatta_sysconfdir}/shell/level/users declare -x -r LESSSECURE=1 + alias more=less fi } 2>/dev/null || : diff --git a/etc/shell/level/users/allowed-op b/etc/shell/level/users/allowed-op index 498d120..4c8d16f 100644 --- a/etc/shell/level/users/allowed-op +++ b/etc/shell/level/users/allowed-op @@ -8,7 +8,6 @@ reboot set show telnet -terminal traceroute undebug vpn diff --git a/etc/shell/level/users/allowed-pipe b/etc/shell/level/users/allowed-pipe index 3204ef3..2d92acc 100644 --- a/etc/shell/level/users/allowed-pipe +++ b/etc/shell/level/users/allowed-pipe @@ -1,4 +1,4 @@ -more +less 1 no-more 1 -- cgit v1.2.3 From 58dac8aa8edab4f904c9a621ad20c016f2b7bda5 Mon Sep 17 00:00:00 2001 From: An-Cheng Huang Date: Wed, 12 Mar 2008 15:03:11 -0700 Subject: handle "<*>" allowed values --- etc/bash_completion.d/20vyatta-cfg | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'etc') diff --git a/etc/bash_completion.d/20vyatta-cfg b/etc/bash_completion.d/20vyatta-cfg index 463b383..4ad86ce 100755 --- a/etc/bash_completion.d/20vyatta-cfg +++ b/etc/bash_completion.d/20vyatta-cfg @@ -440,8 +440,14 @@ vyatta_parse_tmpl () vyatta_cfg_comp_help=$(vyatta_parse_tmpl_comp_fields $1 "comp_help") if (( ${#vyatta_cfg_allowed[@]} == 0 )); then - local ares=$(eval "$acmd") - eval "vyatta_cfg_allowed=( $ares )" + local -a ares=( $(eval "$acmd") ) + for (( i=0 ; i<${#ares[@]} ; i++ )); do + if [[ "${ares[i]}" != \<*\> ]]; then + vyatta_cfg_allowed+=( "${ares[i]}" ) + else + vyatta_cfg_allowed+=( "" ) + fi + done fi if [ -z "$vyatta_cfg_help" ]; then vyatta_cfg_help='' -- cgit v1.2.3 From 1b22d8e098abf1f2cf4f479dab158c7a93805d11 Mon Sep 17 00:00:00 2001 From: Bob Gilligan Date: Mon, 17 Mar 2008 16:53:30 -0700 Subject: Bugfix: 2885 Place the "changes only" directory that is used by the configuration subsystem in its union mount into /tmp. We see kernel panics in unionfs at umount time in some cases when the "changes only" directory is located in a tmpfs filesystem. --- etc/default/vyatta-cfg | 2 +- scripts/vyatta-cfg-cmd-wrapper | 2 +- src/commit.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'etc') diff --git a/etc/default/vyatta-cfg b/etc/default/vyatta-cfg index 7d189d8..b07440f 100644 --- a/etc/default/vyatta-cfg +++ b/etc/default/vyatta-cfg @@ -3,7 +3,7 @@ { declare -x -r VYATTA_ACTIVE_CONFIGURATION_DIR=${vyatta_configdir}/active -declare -x -r VYATTA_CHANGES_ONLY_DIR=${vyatta_configdir}/tmp/changes_only_$$ +declare -x -r VYATTA_CHANGES_ONLY_DIR=/tmp/changes_only_$$ declare -x -r VYATTA_TEMP_CONFIG_DIR=${vyatta_configdir}/tmp/new_config_$$ declare -x -r VYATTA_CONFIG_TMP=${vyatta_configdir}/tmp/tmp_$$ declare -x -r VYATTA_CONFIG_TEMPLATE=$vyatta_cfg_templates diff --git a/scripts/vyatta-cfg-cmd-wrapper b/scripts/vyatta-cfg-cmd-wrapper index a1a573e..518147d 100755 --- a/scripts/vyatta-cfg-cmd-wrapper +++ b/scripts/vyatta-cfg-cmd-wrapper @@ -32,7 +32,7 @@ export VYATTA_EDIT_LEVEL=/; export VYATTA_TEMPLATE_LEVEL=/; export VYATTA_ACTIVE_CONFIGURATION_DIR=/opt/vyatta/config/active; -export VYATTA_CHANGES_ONLY_DIR=/opt/vyatta/config/tmp/changes_only_$PPID; +export VYATTA_CHANGES_ONLY_DIR=/tmp/changes_only_$PPID; export VYATTA_TEMP_CONFIG_DIR=/opt/vyatta/config/tmp/new_config_$PPID; export VYATTA_CONFIG_TMP=/opt/vyatta/config/tmp/tmp_$PPID; diff --git a/src/commit.c b/src/commit.c index c3219e5..980a98b 100644 --- a/src/commit.c +++ b/src/commit.c @@ -1359,7 +1359,7 @@ static int fin_commit(boolean ok) system(command); my_free(command); - command = my_malloc(strlen(format3) + c_len, ""); + command = my_malloc(strlen(format3) + t_len, ""); sprintf(command, format3, get_tmpp()); system(command); my_free(command); -- cgit v1.2.3 From a5b5ad6f5074dd165d777b2a310d609f111e1d9f Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 18 Mar 2008 10:21:03 -0700 Subject: Don't allow operator to run init-floppy Bugfix: 2985 --- etc/shell/level/users/allowed-op | 1 - 1 file changed, 1 deletion(-) (limited to 'etc') diff --git a/etc/shell/level/users/allowed-op b/etc/shell/level/users/allowed-op index 4c8d16f..724c235 100644 --- a/etc/shell/level/users/allowed-op +++ b/etc/shell/level/users/allowed-op @@ -1,7 +1,6 @@ clear debug exit -init-floppy no ping reboot -- cgit v1.2.3 From 50ee96499609f9bd229e6d06a7ce57a17e9e4c52 Mon Sep 17 00:00:00 2001 From: An-Cheng Huang Date: Thu, 20 Mar 2008 10:18:39 -0700 Subject: fix for bug 3037: shell completion --- etc/bash_completion.d/20vyatta-cfg | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'etc') diff --git a/etc/bash_completion.d/20vyatta-cfg b/etc/bash_completion.d/20vyatta-cfg index 4ad86ce..7968cec 100755 --- a/etc/bash_completion.d/20vyatta-cfg +++ b/etc/bash_completion.d/20vyatta-cfg @@ -440,7 +440,8 @@ vyatta_parse_tmpl () vyatta_cfg_comp_help=$(vyatta_parse_tmpl_comp_fields $1 "comp_help") if (( ${#vyatta_cfg_allowed[@]} == 0 )); then - local -a ares=( $(eval "$acmd") ) + astr=$(eval "$acmd") + eval "ares=( $astr )" for (( i=0 ; i<${#ares[@]} ; i++ )); do if [[ "${ares[i]}" != \<*\> ]]; then vyatta_cfg_allowed+=( "${ares[i]}" ) -- cgit v1.2.3 From a1a664266381ee6290f22213dc415960ec24b267 Mon Sep 17 00:00:00 2001 From: An-Cheng Huang Date: Thu, 20 Mar 2008 18:25:42 -0700 Subject: handle <> completion correctly --- etc/bash_completion.d/20vyatta-cfg | 2 ++ 1 file changed, 2 insertions(+) (limited to 'etc') diff --git a/etc/bash_completion.d/20vyatta-cfg b/etc/bash_completion.d/20vyatta-cfg index 7968cec..f979939 100755 --- a/etc/bash_completion.d/20vyatta-cfg +++ b/etc/bash_completion.d/20vyatta-cfg @@ -441,6 +441,8 @@ vyatta_parse_tmpl () if (( ${#vyatta_cfg_allowed[@]} == 0 )); then astr=$(eval "$acmd") + astr=${astr///\\>} eval "ares=( $astr )" for (( i=0 ; i<${#ares[@]} ; i++ )); do if [[ "${ares[i]}" != \<*\> ]]; then -- cgit v1.2.3 From 76aae0216871f8c4f3b1c2ebad6761e67ee3e799 Mon Sep 17 00:00:00 2001 From: An-Cheng Huang Date: Wed, 26 Mar 2008 12:32:24 -0700 Subject: fix for bug 3032: * rename pre-glendale start-up config. * warn user when loading a pre-glendale config. --- etc/init.d/vyatta-ofr | 5 +++++ scripts/vyatta-load-config.pl | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+) (limited to 'etc') diff --git a/etc/init.d/vyatta-ofr b/etc/init.d/vyatta-ofr index b1e7a69..776aaf4 100755 --- a/etc/init.d/vyatta-ofr +++ b/etc/init.d/vyatta-ofr @@ -66,6 +66,11 @@ have_rl_system () { # if necessary, provide initial config init_bootfile () { + if [ -f $BOOTFILE ] && grep -q '/\*XORP Configuration File, v1.0\*/' \ + $BOOTFILE >&/dev/null; then + CURTIME=$(date +%F-%H%M%S) + mv $BOOTFILE $BOOTFILE.pre-glendale.$CURTIME + fi if [ ! -f $BOOTFILE ] ; then if [ -f $vyatta_sysconfdir/config.boot.default ]; then cp $vyatta_sysconfdir/config.boot.default $BOOTFILE diff --git a/scripts/vyatta-load-config.pl b/scripts/vyatta-load-config.pl index a432d8c..05323e3 100755 --- a/scripts/vyatta-load-config.pl +++ b/scripts/vyatta-load-config.pl @@ -40,6 +40,24 @@ if (!($load_file =~ /^\//)) { $load_file = "$bootpath/$load_file"; } +if (!open(CFG, "<$load_file")) { + print "Cannot open configuration file $load_file\n"; + exit 1; +} +while () { + if (/\/\*XORP Configuration File, v1.0\*\//) { + print "Warning: Loading a pre-Glendale configuration.\n"; + print "Do you want to continue? [no] "; + my $resp = ; + if (!($resp =~ /^yes$/i)) { + print "Configuration not loaded\n"; + exit 1; + } + last; + } +} +close CFG; + # do config migration system("$sbindir/vyatta_config_migrate.pl $load_file"); -- cgit v1.2.3