summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorrbalocca <rbalocca@vyatta.com>2008-04-24 13:33:46 -0700
committerrbalocca <rbalocca@vyatta.com>2008-04-24 13:33:46 -0700
commita309f120a9ff472d45544a9101226334e426e76a (patch)
treebfdb25a51f42443587668e8fd5ba0597b0d744d9 /etc
parentc29e34d11a22eecbaa50fa134965f2fa036f47f3 (diff)
parent7fd560b72df1b327b4b47a6232dfcf16d6fae52c (diff)
downloadvyatta-cfg-a309f120a9ff472d45544a9101226334e426e76a.tar.gz
vyatta-cfg-a309f120a9ff472d45544a9101226334e426e76a.zip
Merge branch 'glendale'
Diffstat (limited to 'etc')
-rwxr-xr-x[-rw-r--r--]etc/bash_completion.d/20vyatta-cfg44
-rw-r--r--etc/default/vyatta-cfg4
-rwxr-xr-xetc/init.d/vyatta-ofr33
-rw-r--r--etc/shell/level/users/allowed-op2
-rw-r--r--etc/shell/level/users/allowed-pipe2
5 files changed, 50 insertions, 35 deletions
diff --git a/etc/bash_completion.d/20vyatta-cfg b/etc/bash_completion.d/20vyatta-cfg
index 5966e18..f979939 100644..100755
--- a/etc/bash_completion.d/20vyatta-cfg
+++ b/etc/bash_completion.d/20vyatta-cfg
@@ -1,22 +1,23 @@
+#!/bin/sh
+
# **** 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 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 ****
@@ -439,8 +440,17 @@ 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 )"
+ astr=$(eval "$acmd")
+ astr=${astr//</\\<}
+ astr=${astr//>/\\>}
+ eval "ares=( $astr )"
+ 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='<No help text available>'
diff --git a/etc/default/vyatta-cfg b/etc/default/vyatta-cfg
index ef02233..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
@@ -43,6 +43,8 @@ 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
+ alias more=less
fi
} 2>/dev/null || :
diff --git a/etc/init.d/vyatta-ofr b/etc/init.d/vyatta-ofr
index 89914c4..776aaf4 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 <tgrennan@vyatta.com>
# **** End License ****
@@ -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/etc/shell/level/users/allowed-op b/etc/shell/level/users/allowed-op
index 498d120..724c235 100644
--- a/etc/shell/level/users/allowed-op
+++ b/etc/shell/level/users/allowed-op
@@ -1,14 +1,12 @@
clear
debug
exit
-init-floppy
no
ping
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