diff options
-rw-r--r-- | Makefile.am | 16 | ||||
-rwxr-xr-x[-rw-r--r--] | etc/bash_completion.d/20vyatta-cfg | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | scripts/VyattaConfig.pm | 27 | ||||
-rwxr-xr-x[-rw-r--r--] | scripts/VyattaConfigDOMTree.pm | 4 | ||||
-rwxr-xr-x | scripts/VyattaConfigLoad.pm | 26 | ||||
-rwxr-xr-x | scripts/VyattaConfigOutput.pm | 25 | ||||
-rwxr-xr-x[-rw-r--r--] | scripts/VyattaIpTablesAddressFilter.pm | 25 | ||||
-rwxr-xr-x | scripts/VyattaMisc.pm | 5 | ||||
-rwxr-xr-x[-rw-r--r--] | scripts/VyattaTypeChecker.pm | 25 | ||||
-rwxr-xr-x | scripts/vyatta-cfg-cmd-wrapper | 23 | ||||
-rwxr-xr-x | scripts/vyatta-cfg-notify | 24 | ||||
-rwxr-xr-x | scripts/vyatta-cli-expand-var.pl | 23 | ||||
-rwxr-xr-x | scripts/vyatta-config-loader.pl | 24 | ||||
-rwxr-xr-x[-rw-r--r--] | scripts/vyatta-dhclient-hook | 24 | ||||
-rwxr-xr-x | scripts/vyatta-find-type.pl | 24 | ||||
-rwxr-xr-x[-rw-r--r--] | scripts/vyatta-interfaces.pl | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | scripts/vyatta-irqaffin | 9 | ||||
-rwxr-xr-x | scripts/vyatta-load-config.pl | 26 | ||||
-rwxr-xr-x | scripts/vyatta-output-config.pl | 24 | ||||
-rwxr-xr-x | scripts/vyatta-save-config.pl | 24 | ||||
-rwxr-xr-x | scripts/vyatta-validate-type.pl | 24 |
21 files changed, 376 insertions, 28 deletions
diff --git a/Makefile.am b/Makefile.am index 5d41b2d..2879932 100644 --- a/Makefile.am +++ b/Makefile.am @@ -10,7 +10,7 @@ AM_CFLAGS = -I src -Wall AM_YFLAGS = -d --name-prefix=yy_`basename $* .y`_ AM_LFLAGS = --prefix=yy_`basename $* .l`_ -olex.yy.c -completion_DATA = etc/bash_completion.d/20vyatta-cfg +completion_SCRIPTS = etc/bash_completion.d/20vyatta-cfg initd_SCRIPTS = etc/init.d/vyatta-ofr dhcphook_SCRIPTS = scripts/vyatta-dhclient-hook @@ -43,13 +43,13 @@ sbin_SCRIPTS += scripts/vyatta-cfg-notify sbin_SCRIPTS += scripts/vyatta-interfaces.pl sbin_SCRIPTS += scripts/vyatta-irqaffin -share_perl5_DATA = scripts/VyattaConfig.pm -share_perl5_DATA += scripts/VyattaConfigDOMTree.pm -share_perl5_DATA += scripts/VyattaConfigOutput.pm -share_perl5_DATA += scripts/VyattaConfigLoad.pm -share_perl5_DATA += scripts/VyattaMisc.pm -share_perl5_DATA += scripts/VyattaTypeChecker.pm -share_perl5_DATA += scripts/VyattaIpTablesAddressFilter.pm +share_perl5_SCRIPTS = scripts/VyattaConfig.pm +share_perl5_SCRIPTS += scripts/VyattaConfigDOMTree.pm +share_perl5_SCRIPTS += scripts/VyattaConfigOutput.pm +share_perl5_SCRIPTS += scripts/VyattaConfigLoad.pm +share_perl5_SCRIPTS += scripts/VyattaMisc.pm +share_perl5_SCRIPTS += scripts/VyattaTypeChecker.pm +share_perl5_SCRIPTS += scripts/VyattaIpTablesAddressFilter.pm default_DATA = etc/default/vyatta-cfg diff --git a/etc/bash_completion.d/20vyatta-cfg b/etc/bash_completion.d/20vyatta-cfg index 5966e18..e2a9261 100644..100755 --- 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 # diff --git a/scripts/VyattaConfig.pm b/scripts/VyattaConfig.pm index 9020af0..985ee5a 100644..100755 --- a/scripts/VyattaConfig.pm +++ b/scripts/VyattaConfig.pm @@ -1,3 +1,28 @@ +#!/usr/bin/perl + +# **** 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 code was originally developed by Vyatta, Inc. +# Portions created by Vyatta are Copyright (C) 2006, 2007 Vyatta, Inc. +# All Rights Reserved. +# +# Author: An-Cheng Huang +# Date: 2007 +# Description: vyatta configuration parser +# +# **** End License **** + package VyattaConfig; use strict; @@ -540,5 +565,3 @@ sub compareValueLists { } return %comp_hash; } - - diff --git a/scripts/VyattaConfigDOMTree.pm b/scripts/VyattaConfigDOMTree.pm index 86aabf8..a7e378f 100644..100755 --- a/scripts/VyattaConfigDOMTree.pm +++ b/scripts/VyattaConfigDOMTree.pm @@ -1,5 +1,7 @@ +#!/usr/bin/perl + # -# Module: serial +# Module: vyatta-cfg # # **** License **** # Version: VPL 1.0 diff --git a/scripts/VyattaConfigLoad.pm b/scripts/VyattaConfigLoad.pm index a88d14d..6b857dd 100755 --- a/scripts/VyattaConfigLoad.pm +++ b/scripts/VyattaConfigLoad.pm @@ -1,4 +1,28 @@ -# Perl module for loading configuration. +#!/usr/bin/perl + +# **** 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 code was originally developed by Vyatta, Inc. +# Portions created by Vyatta are Copyright (C) 2006, 2007 Vyatta, Inc. +# All Rights Reserved. +# +# Author: An-Cheng Huang +# Date: 2007 +# Description: Perl module for loading configuration. +# +# **** End License **** + package VyattaConfigLoad; use strict; diff --git a/scripts/VyattaConfigOutput.pm b/scripts/VyattaConfigOutput.pm index 2a152ee..4c16a0b 100755 --- a/scripts/VyattaConfigOutput.pm +++ b/scripts/VyattaConfigOutput.pm @@ -1,5 +1,28 @@ -# Perl module for generating output of the configuration. +#!/usr/bin/perl + +# **** 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 code was originally developed by Vyatta, Inc. +# Portions created by Vyatta are Copyright (C) 2006, 2007 Vyatta, Inc. +# All Rights Reserved. +# +# Author: An-Cheng Huang +# Date: 2007 +# Description: Perl module for generating output of the configuration. +# +# **** End License **** + # outputNewConfig() # prints the "new" config, i.e., the active config with any un-committed # changes. 'diff' notation is also generated to indicate the changes. diff --git a/scripts/VyattaIpTablesAddressFilter.pm b/scripts/VyattaIpTablesAddressFilter.pm index aa6f662..a72bd9d 100644..100755 --- a/scripts/VyattaIpTablesAddressFilter.pm +++ b/scripts/VyattaIpTablesAddressFilter.pm @@ -1,3 +1,28 @@ +#!/usr/bin/perl + +# **** 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 code was originally developed by Vyatta, Inc. +# Portions created by Vyatta are Copyright (C) 2006, 2007 Vyatta, Inc. +# All Rights Reserved. +# +# Author: An-Cheng Huang +# Date: 2007 +# Description: IP tables address filter +# +# **** End License **** + package VyattaIpTablesAddressFilter; use VyattaConfig; diff --git a/scripts/VyattaMisc.pm b/scripts/VyattaMisc.pm index 3a083ec..b476cd4 100755 --- a/scripts/VyattaMisc.pm +++ b/scripts/VyattaMisc.pm @@ -1,4 +1,5 @@ -# +#!/usr/bin/perl + # Module: VyattaMisc.pm # # **** License **** @@ -20,7 +21,7 @@ # # Author: Marat # Date: 2007 -# Description: +# Description: Implements miscellaneous commands # # **** End License **** # diff --git a/scripts/VyattaTypeChecker.pm b/scripts/VyattaTypeChecker.pm index 902c278..98be419 100644..100755 --- a/scripts/VyattaTypeChecker.pm +++ b/scripts/VyattaTypeChecker.pm @@ -1,3 +1,28 @@ +#!/usr/bin/perl + +# **** 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 code was originally developed by Vyatta, Inc. +# Portions created by Vyatta are Copyright (C) 2006, 2007 Vyatta, Inc. +# All Rights Reserved. +# +# Author: An-Cheng Huang +# Date: 2007 +# Description: Type checking script +# +# **** End License **** + # Perl module for type validation. # Usage 1: validate a value of a specific type. # use VyattaTypeChecker; diff --git a/scripts/vyatta-cfg-cmd-wrapper b/scripts/vyatta-cfg-cmd-wrapper index 4a42105..b419f55 100755 --- a/scripts/vyatta-cfg-cmd-wrapper +++ b/scripts/vyatta-cfg-cmd-wrapper @@ -1,5 +1,28 @@ #!/bin/bash +# **** 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 code was originally developed by Vyatta, Inc. +# Portions created by Vyatta are Copyright (C) 2006, 2007 Vyatta, Inc. +# All Rights Reserved. +# +# Author: An-Cheng Huang +# Date: 2007 +# Description: command wrapper +# +# **** End License **** + if grep -q union=aufs /proc/cmdline || grep -q aufs /proc/filesystems ; then export UNIONFS=aufs else diff --git a/scripts/vyatta-cfg-notify b/scripts/vyatta-cfg-notify index e0c56df..098e593 100755 --- a/scripts/vyatta-cfg-notify +++ b/scripts/vyatta-cfg-notify @@ -1,5 +1,28 @@ #!/bin/bash +# **** 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 code was originally developed by Vyatta, Inc. +# Portions created by Vyatta are Copyright (C) 2006, 2007 Vyatta, Inc. +# All Rights Reserved. +# +# Author: An-Cheng Huang +# Date: 2007 +# Description: config notify script +# +# **** End License **** + [ -r /etc/default/vyatta ] && source /etc/default/vyatta declare cur_tty=$(ps -o tty= |head -n1) @@ -19,4 +42,3 @@ Please make sure you do not have conflicting changes. You can also discard the current changes by issuing 'exit discard'. EOF done - diff --git a/scripts/vyatta-cli-expand-var.pl b/scripts/vyatta-cli-expand-var.pl index fcc2b43..2d65029 100755 --- a/scripts/vyatta-cli-expand-var.pl +++ b/scripts/vyatta-cli-expand-var.pl @@ -1,5 +1,28 @@ #!/usr/bin/perl +# **** 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 code was originally developed by Vyatta, Inc. +# Portions created by Vyatta are Copyright (C) 2006, 2007 Vyatta, Inc. +# All Rights Reserved. +# +# Author: An-Cheng Huang +# Date: 2007 +# Description: bash expand script +# +# **** End License **** + use strict; use lib "/opt/vyatta/share/perl5/"; use VyattaConfig; diff --git a/scripts/vyatta-config-loader.pl b/scripts/vyatta-config-loader.pl index 370a669..93eb4d0 100755 --- a/scripts/vyatta-config-loader.pl +++ b/scripts/vyatta-config-loader.pl @@ -1,4 +1,28 @@ #!/usr/bin/perl + +# **** 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 code was originally developed by Vyatta, Inc. +# Portions created by Vyatta are Copyright (C) 2006, 2007 Vyatta, Inc. +# All Rights Reserved. +# +# Author: An-Cheng Huang +# Date: 2007 +# Description: configuration loader +# +# **** End License **** + # Perl script for loading the startup config file. # $0: startup config file. diff --git a/scripts/vyatta-dhclient-hook b/scripts/vyatta-dhclient-hook index cc3cb08..c346498 100644..100755 --- a/scripts/vyatta-dhclient-hook +++ b/scripts/vyatta-dhclient-hook @@ -1,3 +1,27 @@ +#!/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 code was originally developed by Vyatta, Inc. +# Portions created by Vyatta are Copyright (C) 2006, 2007 Vyatta, Inc. +# All Rights Reserved. +# +# Author: Stig Thormodsrud +# Date: 2007 +# Description: dhcp client hook +# +# **** End License **** # To enable this script set the following variable to "yes" RUN="yes" diff --git a/scripts/vyatta-find-type.pl b/scripts/vyatta-find-type.pl index b6514f0..37b5d2e 100755 --- a/scripts/vyatta-find-type.pl +++ b/scripts/vyatta-find-type.pl @@ -1,5 +1,28 @@ #!/usr/bin/perl +# **** 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 code was originally developed by Vyatta, Inc. +# Portions created by Vyatta are Copyright (C) 2006, 2007 Vyatta, Inc. +# All Rights Reserved. +# +# Author: An-Cheng Huang +# Date: 2007 +# Description: bash completion for Vyatta configuration commands +# +# **** End License **** + use strict; use lib "/opt/vyatta/share/perl5/"; use VyattaTypeChecker; @@ -18,4 +41,3 @@ if (my $type = VyattaTypeChecker::findType(@ARGV)) { # value not valid for any of the candidates exit 1; - diff --git a/scripts/vyatta-interfaces.pl b/scripts/vyatta-interfaces.pl index 482faa8..482faa8 100644..100755 --- a/scripts/vyatta-interfaces.pl +++ b/scripts/vyatta-interfaces.pl diff --git a/scripts/vyatta-irqaffin b/scripts/vyatta-irqaffin index 8be98b2..4deb662 100644..100755 --- a/scripts/vyatta-irqaffin +++ b/scripts/vyatta-irqaffin @@ -1,6 +1,5 @@ - #!/bin/bash -# + # **** License **** # Version: VPL 1.0 # @@ -20,12 +19,10 @@ # # Author: Robert E. Gilligan # Date: 2008 -# Description: +# Description: CLI back-end script to manipulate NIC interrupt CPU affinity. # # **** End License **** -# -# CLI back-end script to manipulate NIC interrupt CPU affinity. -# + # Provides sub-commands to: # - Check the validity of an interface name and affinity mask value # - Set the affinity mask to the IRQ being used by an interface diff --git a/scripts/vyatta-load-config.pl b/scripts/vyatta-load-config.pl index be3c751..50d9d7c 100755 --- a/scripts/vyatta-load-config.pl +++ b/scripts/vyatta-load-config.pl @@ -1,5 +1,28 @@ #!/usr/bin/perl -# Perl script for loading config file at run time. + +# **** 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 code was originally developed by Vyatta, Inc. +# Portions created by Vyatta are Copyright (C) 2006, 2007 Vyatta, Inc. +# All Rights Reserved. +# +# Author: An-Cheng Huang +# Date: 2007 +# Description: Perl script for loading config file at run time. +# +# **** End License **** + # $0: config file. use strict; @@ -71,4 +94,3 @@ if ($? >> 8) { print "Done\n"; exit 0; - diff --git a/scripts/vyatta-output-config.pl b/scripts/vyatta-output-config.pl index 65169f6..8f6b814 100755 --- a/scripts/vyatta-output-config.pl +++ b/scripts/vyatta-output-config.pl @@ -1,5 +1,28 @@ #!/usr/bin/perl +# **** 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 code was originally developed by Vyatta, Inc. +# Portions created by Vyatta are Copyright (C) 2006, 2007 Vyatta, Inc. +# All Rights Reserved. +# +# Author: An-Cheng Huang +# Date: 2007 +# Description: Script5 to output the configuration` +# +# **** End License **** + use strict; use lib "/opt/vyatta/share/perl5/"; use VyattaConfigOutput; @@ -16,4 +39,3 @@ if ($ARGV[0] eq '-active') { VyattaConfigOutput::outputNewConfig(@ARGV); } exit 0; - diff --git a/scripts/vyatta-save-config.pl b/scripts/vyatta-save-config.pl index bad7c45..41f1051 100755 --- a/scripts/vyatta-save-config.pl +++ b/scripts/vyatta-save-config.pl @@ -1,5 +1,28 @@ #!/usr/bin/perl +# **** 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 code was originally developed by Vyatta, Inc. +# Portions created by Vyatta are Copyright (C) 2006, 2007 Vyatta, Inc. +# All Rights Reserved. +# +# Author: An-Cheng Huang +# Date: 2007 +# Description: script to save the configuration +# +# **** End License **** + use strict; use lib "/opt/vyatta/share/perl5/"; use VyattaConfigOutput; @@ -37,4 +60,3 @@ select STDOUT; print "\nDone\n"; close SAVE; exit 0; - diff --git a/scripts/vyatta-validate-type.pl b/scripts/vyatta-validate-type.pl index 64b7e8a..eee23bb 100755 --- a/scripts/vyatta-validate-type.pl +++ b/scripts/vyatta-validate-type.pl @@ -1,5 +1,28 @@ #!/usr/bin/perl +# **** 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 code was originally developed by Vyatta, Inc. +# Portions created by Vyatta are Copyright (C) 2006, 2007 Vyatta, Inc. +# All Rights Reserved. +# +# Author: An-Cheng Huang +# Date: 2007 +# Description: script to validate types +# +# **** End License **** + use strict; use lib "/opt/vyatta/share/perl5/"; use VyattaTypeChecker; @@ -18,4 +41,3 @@ if ($ARGV[0] eq '-q') { exit 0 if (VyattaTypeChecker::validateType($ARGV[0], $ARGV[1], $quiet)); exit 1; - |