mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Correct license header mainly for patches folder
Signed-off-by: Chip Childers <chip.childers@gmail.com> I've assumed that Gavin's commit is appropriate, based on an assumption that we will keep these files in the source tree. If https://issues.apache.org/jira/browse/LEGAL-146 results in a different opionion from the members, then we will end up having to do something more drastic anyway.
This commit is contained in:
parent
afb05ef3dc
commit
39a676c496
@ -1,19 +1,19 @@
|
|||||||
# Licensed to the Apache Software Foundation (ASF) under one
|
-- Licensed to the Apache Software Foundation (ASF) under one
|
||||||
# or more contributor license agreements. See the NOTICE file
|
-- or more contributor license agreements. See the NOTICE file
|
||||||
# distributed with this work for additional information
|
-- distributed with this work for additional information
|
||||||
# regarding copyright ownership. The ASF licenses this file
|
-- regarding copyright ownership. The ASF licenses this file
|
||||||
# to you under the Apache License, Version 2.0 (the
|
-- to you under the Apache License, Version 2.0 (the
|
||||||
# "License"); you may not use this file except in compliance
|
-- "License"); you may not use this file except in compliance
|
||||||
# with the License. You may obtain a copy of the License at
|
-- with the License. You may obtain a copy of the License at
|
||||||
#
|
--
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
-- http://www.apache.org/licenses/LICENSE-2.0
|
||||||
#
|
--
|
||||||
# Unless required by applicable law or agreed to in writing,
|
-- Unless required by applicable law or agreed to in writing,
|
||||||
# software distributed under the License is distributed on an
|
-- software distributed under the License is distributed on an
|
||||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
# KIND, either express or implied. See the License for the
|
-- KIND, either express or implied. See the License for the
|
||||||
# specific language governing permissions and limitations
|
-- specific language governing permissions and limitations
|
||||||
# under the License.
|
-- under the License.
|
||||||
INSERT INTO `vmops`.`vm_template` (id, unique_name, name, public, path, created, type, hvm, bits, created_by, url, checksum, ready, display_text, enable_password)
|
INSERT INTO `vmops`.`vm_template` (id, unique_name, name, public, path, created, type, hvm, bits, created_by, url, checksum, ready, display_text, enable_password)
|
||||||
VALUES (1, 'routing', 'DomR Template', 0, 'tank/volumes/demo/template/private/u000000/os/routing', now(), 'ext3', 0, 64, 1, 'http://vmopsserver.lab.vmops.com/images/routing/vmi-root-fc8-x86_64-domR.img.bz2', 'd00927f863a23b98cc6df6e377c9d0c6', 0, 'DomR Template', 0);
|
VALUES (1, 'routing', 'DomR Template', 0, 'tank/volumes/demo/template/private/u000000/os/routing', now(), 'ext3', 0, 64, 1, 'http://vmopsserver.lab.vmops.com/images/routing/vmi-root-fc8-x86_64-domR.img.bz2', 'd00927f863a23b98cc6df6e377c9d0c6', 0, 'DomR Template', 0);
|
||||||
INSERT INTO `vmops`.`vm_template` (id, unique_name, name, public, path, created, type, hvm, bits, created_by, url, checksum, ready, display_text, enable_password)
|
INSERT INTO `vmops`.`vm_template` (id, unique_name, name, public, path, created, type, hvm, bits, created_by, url, checksum, ready, display_text, enable_password)
|
||||||
|
|||||||
@ -1,16 +1,19 @@
|
|||||||
# Copyright 2012 Citrix Systems, Inc. Licensed under the
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
# Apache License, Version 2.0 (the "License"); you may not use this
|
# or more contributor license agreements. See the NOTICE file
|
||||||
# file except in compliance with the License. Citrix Systems, Inc.
|
# distributed with this work for additional information
|
||||||
# reserves all rights not expressly granted by the License.
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
# to you under the Apache License, Version 2.0 (the
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
# "License"); you may not use this file except in compliance
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
# with the License. You may obtain a copy of the License at
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
#
|
||||||
# See the License for the specific language governing permissions and
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
# limitations under the License.
|
#
|
||||||
#
|
# Unless required by applicable law or agreed to in writing,
|
||||||
# Automatically generated by addcopyright.py at 04/03/2012
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
|
||||||
if [ "`id -u`" -eq 0 ]; then
|
if [ "`id -u`" -eq 0 ]; then
|
||||||
|
|||||||
@ -1,16 +1,20 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Copyright 2012 Citrix Systems, Inc. Licensed under the
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
# Apache License, Version 2.0 (the "License"); you may not use this
|
# or more contributor license agreements. See the NOTICE file
|
||||||
# file except in compliance with the License. Citrix Systems, Inc.
|
# distributed with this work for additional information
|
||||||
# reserves all rights not expressly granted by the License.
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
# to you under the Apache License, Version 2.0 (the
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
# "License"); you may not use this file except in compliance
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
# with the License. You may obtain a copy of the License at
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
#
|
||||||
# See the License for the specific language governing permissions and
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
# limitations under the License.
|
#
|
||||||
#
|
# Unless required by applicable law or agreed to in writing,
|
||||||
# Automatically generated by addcopyright.py at 04/03/2012
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
echo -n `cat /etc/cloudstack-release`'&'
|
echo -n `cat /etc/cloudstack-release`'&'
|
||||||
cat /var/cache/cloud/cloud-scripts-signature
|
cat /var/cache/cloud/cloud-scripts-signature
|
||||||
|
|||||||
@ -1,18 +1,20 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Copyright 2012 Citrix Systems, Inc. Licensed under the
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
# Apache License, Version 2.0 (the "License"); you may not use this
|
# or more contributor license agreements. See the NOTICE file
|
||||||
# file except in compliance with the License. Citrix Systems, Inc.
|
# distributed with this work for additional information
|
||||||
# reserves all rights not expressly granted by the License.
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
# to you under the Apache License, Version 2.0 (the
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
# "License"); you may not use this file except in compliance
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
# with the License. You may obtain a copy of the License at
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
#
|
||||||
# See the License for the specific language governing permissions and
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
# limitations under the License.
|
#
|
||||||
#
|
# Unless required by applicable law or agreed to in writing,
|
||||||
# Automatically generated by addcopyright.py at 04/03/2012
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,15 +1,21 @@
|
|||||||
# Copyright 2012 Citrix Systems, Inc. Licensed under the
|
|
||||||
# Apache License, Version 2.0 (the "License"); you may not use this
|
|
||||||
# file except in compliance with the License. Citrix Systems, Inc.
|
|
||||||
# reserves all rights not expressly granted by the License.
|
|
||||||
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
|
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
# or more contributor license agreements. See the NOTICE file
|
||||||
|
# distributed with this work for additional information
|
||||||
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
|
# to you under the Apache License, Version 2.0 (the
|
||||||
|
# "License"); you may not use this file except in compliance
|
||||||
|
# with the License. You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing,
|
||||||
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
source /root/func.sh
|
source /root/func.sh
|
||||||
|
|
||||||
lock="biglock"
|
lock="biglock"
|
||||||
|
|||||||
@ -1,18 +1,20 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Copyright 2012 Citrix Systems, Inc. Licensed under the
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
# Apache License, Version 2.0 (the "License"); you may not use this
|
# or more contributor license agreements. See the NOTICE file
|
||||||
# file except in compliance with the License. Citrix Systems, Inc.
|
# distributed with this work for additional information
|
||||||
# reserves all rights not expressly granted by the License.
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
# to you under the Apache License, Version 2.0 (the
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
# "License"); you may not use this file except in compliance
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
# with the License. You may obtain a copy of the License at
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
#
|
||||||
# See the License for the specific language governing permissions and
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
# limitations under the License.
|
#
|
||||||
#
|
# Unless required by applicable law or agreed to in writing,
|
||||||
# Automatically generated by addcopyright.py at 04/03/2012
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,18 +1,20 @@
|
|||||||
#/bin/bash
|
#/bin/bash
|
||||||
# Copyright 2012 Citrix Systems, Inc. Licensed under the
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
# Apache License, Version 2.0 (the "License"); you may not use this
|
# or more contributor license agreements. See the NOTICE file
|
||||||
# file except in compliance with the License. Citrix Systems, Inc.
|
# distributed with this work for additional information
|
||||||
# reserves all rights not expressly granted by the License.
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
# to you under the Apache License, Version 2.0 (the
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
# "License"); you may not use this file except in compliance
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
# with the License. You may obtain a copy of the License at
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
#
|
||||||
# See the License for the specific language governing permissions and
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
# limitations under the License.
|
#
|
||||||
#
|
# Unless required by applicable law or agreed to in writing,
|
||||||
# Automatically generated by addcopyright.py at 04/03/2012
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,19 +1,20 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Copyright 2012 Citrix Systems, Inc. Licensed under the
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
# Apache License, Version 2.0 (the "License"); you may not use this
|
# or more contributor license agreements. See the NOTICE file
|
||||||
# file except in compliance with the License. Citrix Systems, Inc.
|
# distributed with this work for additional information
|
||||||
# reserves all rights not expressly granted by the License.
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
# to you under the Apache License, Version 2.0 (the
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
# "License"); you may not use this file except in compliance
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
# with the License. You may obtain a copy of the License at
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
#
|
||||||
# See the License for the specific language governing permissions and
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
# limitations under the License.
|
#
|
||||||
#
|
# Unless required by applicable law or agreed to in writing,
|
||||||
# Automatically generated by addcopyright.py at 04/03/2012
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,16 +1,20 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Copyright 2012 Citrix Systems, Inc. Licensed under the
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
# Apache License, Version 2.0 (the "License"); you may not use this
|
# or more contributor license agreements. See the NOTICE file
|
||||||
# file except in compliance with the License. Citrix Systems, Inc.
|
# distributed with this work for additional information
|
||||||
# reserves all rights not expressly granted by the License.
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
# to you under the Apache License, Version 2.0 (the
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
# "License"); you may not use this file except in compliance
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
# with the License. You may obtain a copy of the License at
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
#
|
||||||
# See the License for the specific language governing permissions and
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
# limitations under the License.
|
#
|
||||||
#
|
# Unless required by applicable law or agreed to in writing,
|
||||||
# Automatically generated by addcopyright.py at 04/03/2012
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
# firewall_rule.sh -- allow some ports / protocols to vm instances
|
# firewall_rule.sh -- allow some ports / protocols to vm instances
|
||||||
# @VERSION@
|
# @VERSION@
|
||||||
|
|
||||||
|
|||||||
@ -1,16 +1,20 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Copyright 2012 Citrix Systems, Inc. Licensed under the
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
# Apache License, Version 2.0 (the "License"); you may not use this
|
# or more contributor license agreements. See the NOTICE file
|
||||||
# file except in compliance with the License. Citrix Systems, Inc.
|
# distributed with this work for additional information
|
||||||
# reserves all rights not expressly granted by the License.
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
# to you under the Apache License, Version 2.0 (the
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
# "License"); you may not use this file except in compliance
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
# with the License. You may obtain a copy of the License at
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
#
|
||||||
# See the License for the specific language governing permissions and
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
# limitations under the License.
|
#
|
||||||
#
|
# Unless required by applicable law or agreed to in writing,
|
||||||
# Automatically generated by addcopyright.py at 04/03/2012
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
# @VERSION@
|
# @VERSION@
|
||||||
|
|
||||||
|
|||||||
@ -1,16 +1,20 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Copyright 2012 Citrix Systems, Inc. Licensed under the
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
# Apache License, Version 2.0 (the "License"); you may not use this
|
# or more contributor license agreements. See the NOTICE file
|
||||||
# file except in compliance with the License. Citrix Systems, Inc.
|
# distributed with this work for additional information
|
||||||
# reserves all rights not expressly granted by the License.
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
# to you under the Apache License, Version 2.0 (the
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
# "License"); you may not use this file except in compliance
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
# with the License. You may obtain a copy of the License at
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
#
|
||||||
# See the License for the specific language governing permissions and
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
# limitations under the License.
|
#
|
||||||
#
|
# Unless required by applicable law or agreed to in writing,
|
||||||
# Automatically generated by addcopyright.py at 04/03/2012
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
# guestnw.sh -- create/destroy guest network
|
# guestnw.sh -- create/destroy guest network
|
||||||
# @VERSION@
|
# @VERSION@
|
||||||
|
|||||||
@ -1,18 +1,20 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Copyright 2012 Citrix Systems, Inc. Licensed under the
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
# Apache License, Version 2.0 (the "License"); you may not use this
|
# or more contributor license agreements. See the NOTICE file
|
||||||
# file except in compliance with the License. Citrix Systems, Inc.
|
# distributed with this work for additional information
|
||||||
# reserves all rights not expressly granted by the License.
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
# to you under the Apache License, Version 2.0 (the
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
# "License"); you may not use this file except in compliance
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
# with the License. You may obtain a copy of the License at
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
#
|
||||||
# See the License for the specific language governing permissions and
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
# limitations under the License.
|
#
|
||||||
#
|
# Unless required by applicable law or agreed to in writing,
|
||||||
# Automatically generated by addcopyright.py at 04/03/2012
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,16 +1,20 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Copyright 2012 Citrix Systems, Inc. Licensed under the
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
# Apache License, Version 2.0 (the "License"); you may not use this
|
# or more contributor license agreements. See the NOTICE file
|
||||||
# file except in compliance with the License. Citrix Systems, Inc.
|
# distributed with this work for additional information
|
||||||
# reserves all rights not expressly granted by the License.
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
# to you under the Apache License, Version 2.0 (the
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
# "License"); you may not use this file except in compliance
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
# with the License. You may obtain a copy of the License at
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
#
|
||||||
# See the License for the specific language governing permissions and
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
# limitations under the License.
|
#
|
||||||
#
|
# Unless required by applicable law or agreed to in writing,
|
||||||
# Automatically generated by addcopyright.py at 04/03/2012
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
# @VERSION@
|
# @VERSION@
|
||||||
|
|
||||||
|
|||||||
@ -1,16 +1,20 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Copyright 2012 Citrix Systems, Inc. Licensed under the
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
# Apache License, Version 2.0 (the "License"); you may not use this
|
# or more contributor license agreements. See the NOTICE file
|
||||||
# file except in compliance with the License. Citrix Systems, Inc.
|
# distributed with this work for additional information
|
||||||
# reserves all rights not expressly granted by the License.
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
# to you under the Apache License, Version 2.0 (the
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
# "License"); you may not use this file except in compliance
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
# with the License. You may obtain a copy of the License at
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
#
|
||||||
# See the License for the specific language governing permissions and
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
# limitations under the License.
|
#
|
||||||
#
|
# Unless required by applicable law or agreed to in writing,
|
||||||
# Automatically generated by addcopyright.py at 04/03/2012
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
source /root/func.sh
|
source /root/func.sh
|
||||||
source /opt/cloud/bin/vpc_func.sh
|
source /opt/cloud/bin/vpc_func.sh
|
||||||
|
|||||||
@ -1,16 +1,20 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Copyright 2012 Citrix Systems, Inc. Licensed under the
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
# Apache License, Version 2.0 (the "License"); you may not use this
|
# or more contributor license agreements. See the NOTICE file
|
||||||
# file except in compliance with the License. Citrix Systems, Inc.
|
# distributed with this work for additional information
|
||||||
# reserves all rights not expressly granted by the License.
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
# to you under the Apache License, Version 2.0 (the
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
# "License"); you may not use this file except in compliance
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
# with the License. You may obtain a copy of the License at
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
#
|
||||||
# See the License for the specific language governing permissions and
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
# limitations under the License.
|
#
|
||||||
#
|
# Unless required by applicable law or agreed to in writing,
|
||||||
# Automatically generated by addcopyright.py at 04/03/2012
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
# @VERSION@
|
# @VERSION@
|
||||||
|
|
||||||
source /root/func.sh
|
source /root/func.sh
|
||||||
|
|||||||
@ -1,16 +1,20 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Copyright 2012 Citrix Systems, Inc. Licensed under the
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
# Apache License, Version 2.0 (the "License"); you may not use this
|
# or more contributor license agreements. See the NOTICE file
|
||||||
# file except in compliance with the License. Citrix Systems, Inc.
|
# distributed with this work for additional information
|
||||||
# reserves all rights not expressly granted by the License.
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
# to you under the Apache License, Version 2.0 (the
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
# "License"); you may not use this file except in compliance
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
# with the License. You may obtain a copy of the License at
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
#
|
||||||
# See the License for the specific language governing permissions and
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
# limitations under the License.
|
#
|
||||||
#
|
# Unless required by applicable law or agreed to in writing,
|
||||||
# Automatically generated by addcopyright.py at 04/03/2012
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
# @VERSION@
|
# @VERSION@
|
||||||
|
|
||||||
|
|||||||
@ -1,16 +1,20 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Copyright 2012 Citrix Systems, Inc. Licensed under the
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
# Apache License, Version 2.0 (the "License"); you may not use this
|
# or more contributor license agreements. See the NOTICE file
|
||||||
# file except in compliance with the License. Citrix Systems, Inc.
|
# distributed with this work for additional information
|
||||||
# reserves all rights not expressly granted by the License.
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
# to you under the Apache License, Version 2.0 (the
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
# "License"); you may not use this file except in compliance
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
# with the License. You may obtain a copy of the License at
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
#
|
||||||
# See the License for the specific language governing permissions and
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
# limitations under the License.
|
#
|
||||||
#
|
# Unless required by applicable law or agreed to in writing,
|
||||||
# Automatically generated by addcopyright.py at 04/03/2012
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
# @VERSION@
|
# @VERSION@
|
||||||
|
|
||||||
|
|||||||
@ -1,16 +1,20 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Copyright 2012 Citrix Systems, Inc. Licensed under the
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
# Apache License, Version 2.0 (the "License"); you may not use this
|
# or more contributor license agreements. See the NOTICE file
|
||||||
# file except in compliance with the License. Citrix Systems, Inc.
|
# distributed with this work for additional information
|
||||||
# reserves all rights not expressly granted by the License.
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
# to you under the Apache License, Version 2.0 (the
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
# "License"); you may not use this file except in compliance
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
# with the License. You may obtain a copy of the License at
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
#
|
||||||
# See the License for the specific language governing permissions and
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
# limitations under the License.
|
#
|
||||||
#
|
# Unless required by applicable law or agreed to in writing,
|
||||||
# Automatically generated by addcopyright.py at 04/03/2012
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
# @VERSION@
|
# @VERSION@
|
||||||
|
|
||||||
source /root/func.sh
|
source /root/func.sh
|
||||||
|
|||||||
@ -1,16 +1,20 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Copyright 2012 Citrix Systems, Inc. Licensed under the
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
# Apache License, Version 2.0 (the "License"); you may not use this
|
# or more contributor license agreements. See the NOTICE file
|
||||||
# file except in compliance with the License. Citrix Systems, Inc.
|
# distributed with this work for additional information
|
||||||
# reserves all rights not expressly granted by the License.
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
# to you under the Apache License, Version 2.0 (the
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
# "License"); you may not use this file except in compliance
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
# with the License. You may obtain a copy of the License at
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
#
|
||||||
# See the License for the specific language governing permissions and
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
# limitations under the License.
|
#
|
||||||
#
|
# Unless required by applicable law or agreed to in writing,
|
||||||
# Automatically generated by addcopyright.py at 04/03/2012
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
# @VERSION@
|
# @VERSION@
|
||||||
|
|
||||||
source /root/func.sh
|
source /root/func.sh
|
||||||
|
|||||||
@ -1,15 +1,19 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Copyright 2012 Citrix Systems, Inc. Licensed under the
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
# Apache License, Version 2.0 (the "License"); you may not use this
|
# or more contributor license agreements. See the NOTICE file
|
||||||
# file except in compliance with the License. Citrix Systems, Inc.
|
# distributed with this work for additional information
|
||||||
# reserves all rights not expressly granted by the License.
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
# to you under the Apache License, Version 2.0 (the
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
# "License"); you may not use this file except in compliance
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
# with the License. You may obtain a copy of the License at
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
#
|
||||||
# See the License for the specific language governing permissions and
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
# limitations under the License.
|
#
|
||||||
#
|
# Unless required by applicable law or agreed to in writing,
|
||||||
# Automatically generated by addcopyright.py at 04/03/2012
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
touch /tmp/rrouter_bumped
|
touch /tmp/rrouter_bumped
|
||||||
|
|||||||
@ -1,19 +1,20 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Copyright 2012 Citrix Systems, Inc. Licensed under the
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
# Apache License, Version 2.0 (the "License"); you may not use this
|
# or more contributor license agreements. See the NOTICE file
|
||||||
# file except in compliance with the License. Citrix Systems, Inc.
|
# distributed with this work for additional information
|
||||||
# reserves all rights not expressly granted by the License.
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
# to you under the Apache License, Version 2.0 (the
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
# "License"); you may not use this file except in compliance
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
# with the License. You may obtain a copy of the License at
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
#
|
||||||
# See the License for the specific language governing permissions and
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
# limitations under the License.
|
#
|
||||||
#
|
# Unless required by applicable law or agreed to in writing,
|
||||||
# Automatically generated by addcopyright.py at 04/03/2012
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
|
||||||
# clearUsageRules.sh - remove iptable rules for removed public interfaces
|
# clearUsageRules.sh - remove iptable rules for removed public interfaces
|
||||||
|
|||||||
@ -1,17 +1,20 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Copyright 2012 Citrix Systems, Inc. Licensed under the
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
# Apache License, Version 2.0 (the "License"); you may not use this
|
# or more contributor license agreements. See the NOTICE file
|
||||||
# file except in compliance with the License. Citrix Systems, Inc.
|
# distributed with this work for additional information
|
||||||
# reserves all rights not expressly granted by the License.
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
# to you under the Apache License, Version 2.0 (the
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
# "License"); you may not use this file except in compliance
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
# with the License. You may obtain a copy of the License at
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
#
|
||||||
# See the License for the specific language governing permissions and
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
# limitations under the License.
|
#
|
||||||
#
|
# Unless required by applicable law or agreed to in writing,
|
||||||
# Automatically generated by addcopyright.py at 04/03/2012
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,16 +1,20 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Copyright 2012 Citrix Systems, Inc. Licensed under the
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
# Apache License, Version 2.0 (the "License"); you may not use this
|
# or more contributor license agreements. See the NOTICE file
|
||||||
# file except in compliance with the License. Citrix Systems, Inc.
|
# distributed with this work for additional information
|
||||||
# reserves all rights not expressly granted by the License.
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
# to you under the Apache License, Version 2.0 (the
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
# "License"); you may not use this file except in compliance
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
# with the License. You may obtain a copy of the License at
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
#
|
||||||
# See the License for the specific language governing permissions and
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
# limitations under the License.
|
#
|
||||||
#
|
# Unless required by applicable law or agreed to in writing,
|
||||||
# Automatically generated by addcopyright.py at 04/03/2012
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
# $Id: firewall.sh 9947 2010-06-25 19:34:24Z manuel $ $HeadURL: svn://svn.lab.vmops.com/repos/vmdev/java/patches/xenserver/root/firewall.sh $
|
# $Id: firewall.sh 9947 2010-06-25 19:34:24Z manuel $ $HeadURL: svn://svn.lab.vmops.com/repos/vmdev/java/patches/xenserver/root/firewall.sh $
|
||||||
# firewall.sh -- allow some ports / protocols to vm instances
|
# firewall.sh -- allow some ports / protocols to vm instances
|
||||||
# @VERSION@
|
# @VERSION@
|
||||||
|
|||||||
@ -1,16 +1,20 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Copyright 2012 Citrix Systems, Inc. Licensed under the
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
# Apache License, Version 2.0 (the "License"); you may not use this
|
# or more contributor license agreements. See the NOTICE file
|
||||||
# file except in compliance with the License. Citrix Systems, Inc.
|
# distributed with this work for additional information
|
||||||
# reserves all rights not expressly granted by the License.
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
# to you under the Apache License, Version 2.0 (the
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
# "License"); you may not use this file except in compliance
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
# with the License. You may obtain a copy of the License at
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
#
|
||||||
# See the License for the specific language governing permissions and
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
# limitations under the License.
|
#
|
||||||
#
|
# Unless required by applicable law or agreed to in writing,
|
||||||
# Automatically generated by addcopyright.py at 04/03/2012
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
# firewall_rule.sh -- allow some ports / protocols to vm instances
|
# firewall_rule.sh -- allow some ports / protocols to vm instances
|
||||||
# @VERSION@
|
# @VERSION@
|
||||||
|
|
||||||
|
|||||||
@ -1,16 +1,20 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Copyright 2012 Citrix Systems, Inc. Licensed under the
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
# Apache License, Version 2.0 (the "License"); you may not use this
|
# or more contributor license agreements. See the NOTICE file
|
||||||
# file except in compliance with the License. Citrix Systems, Inc.
|
# distributed with this work for additional information
|
||||||
# reserves all rights not expressly granted by the License.
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
# to you under the Apache License, Version 2.0 (the
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
# "License"); you may not use this file except in compliance
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
# with the License. You may obtain a copy of the License at
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
#
|
||||||
# See the License for the specific language governing permissions and
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
# limitations under the License.
|
#
|
||||||
#
|
# Unless required by applicable law or agreed to in writing,
|
||||||
# Automatically generated by addcopyright.py at 04/03/2012
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
# Only one lock is allowed: biglock
|
# Only one lock is allowed: biglock
|
||||||
|
|
||||||
|
|||||||
@ -1,18 +1,20 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Copyright 2012 Citrix Systems, Inc. Licensed under the
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
# Apache License, Version 2.0 (the "License"); you may not use this
|
# or more contributor license agreements. See the NOTICE file
|
||||||
# file except in compliance with the License. Citrix Systems, Inc.
|
# distributed with this work for additional information
|
||||||
# reserves all rights not expressly granted by the License.
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
# to you under the Apache License, Version 2.0 (the
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
# "License"); you may not use this file except in compliance
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
# with the License. You may obtain a copy of the License at
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
#
|
||||||
# See the License for the specific language governing permissions and
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
# limitations under the License.
|
#
|
||||||
#
|
# Unless required by applicable law or agreed to in writing,
|
||||||
# Automatically generated by addcopyright.py at 04/03/2012
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,18 +1,20 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Copyright 2012 Citrix Systems, Inc. Licensed under the
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
# Apache License, Version 2.0 (the "License"); you may not use this
|
# or more contributor license agreements. See the NOTICE file
|
||||||
# file except in compliance with the License. Citrix Systems, Inc.
|
# distributed with this work for additional information
|
||||||
# reserves all rights not expressly granted by the License.
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
# to you under the Apache License, Version 2.0 (the
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
# "License"); you may not use this file except in compliance
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
# with the License. You may obtain a copy of the License at
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
#
|
||||||
# See the License for the specific language governing permissions and
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
# limitations under the License.
|
#
|
||||||
#
|
# Unless required by applicable law or agreed to in writing,
|
||||||
# Automatically generated by addcopyright.py at 04/03/2012
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
|
||||||
ret=0
|
ret=0
|
||||||
|
|||||||
@ -1,15 +1,19 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Copyright 2012 Citrix Systems, Inc. Licensed under the
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
# Apache License, Version 2.0 (the "License"); you may not use this
|
# or more contributor license agreements. See the NOTICE file
|
||||||
# file except in compliance with the License. Citrix Systems, Inc.
|
# distributed with this work for additional information
|
||||||
# reserves all rights not expressly granted by the License.
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
# to you under the Apache License, Version 2.0 (the
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
# "License"); you may not use this file except in compliance
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
# with the License. You may obtain a copy of the License at
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
#
|
||||||
# See the License for the specific language governing permissions and
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
# limitations under the License.
|
#
|
||||||
#
|
# Unless required by applicable law or agreed to in writing,
|
||||||
# Automatically generated by addcopyright.py at 04/03/2012
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
cat /tmp/rrouter_bumped
|
cat /tmp/rrouter_bumped
|
||||||
|
|||||||
@ -1,16 +1,20 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Copyright 2012 Citrix Systems, Inc. Licensed under the
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
# Apache License, Version 2.0 (the "License"); you may not use this
|
# or more contributor license agreements. See the NOTICE file
|
||||||
# file except in compliance with the License. Citrix Systems, Inc.
|
# distributed with this work for additional information
|
||||||
# reserves all rights not expressly granted by the License.
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
# to you under the Apache License, Version 2.0 (the
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
# "License"); you may not use this file except in compliance
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
# with the License. You may obtain a copy of the License at
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
#
|
||||||
# See the License for the specific language governing permissions and
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
# limitations under the License.
|
#
|
||||||
#
|
# Unless required by applicable law or agreed to in writing,
|
||||||
# Automatically generated by addcopyright.py at 04/03/2012
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
ip link|grep BROADCAST|grep -v eth0|grep -v eth1|cut -d ":" -f 2 > /tmp/iflist
|
ip link|grep BROADCAST|grep -v eth0|grep -v eth1|cut -d ":" -f 2 > /tmp/iflist
|
||||||
while read i
|
while read i
|
||||||
|
|||||||
@ -1,13 +1,19 @@
|
|||||||
#Copyright 2012 Citrix Systems, Inc. Licensed under the
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
#Apache License, Version 2.0 (the "License"); you may not use this
|
# or more contributor license agreements. See the NOTICE file
|
||||||
#file except in compliance with the License. Citrix Systems, Inc.
|
# distributed with this work for additional information
|
||||||
#reserves all rights not expressly granted by the License.
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
#You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
# to you under the Apache License, Version 2.0 (the
|
||||||
#Unless required by applicable law or agreed to in writing, software
|
# "License"); you may not use this file except in compliance
|
||||||
#distributed under the License is distributed on an "AS IS" BASIS,
|
# with the License. You may obtain a copy of the License at
|
||||||
#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
#
|
||||||
#See the License for the specific language governing permissions and
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
#limitations under the License.
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing,
|
||||||
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
CONNTRACKD_BIN=/usr/sbin/conntrackd
|
CONNTRACKD_BIN=/usr/sbin/conntrackd
|
||||||
CONNTRACKD_LOCK=/var/lock/conntrack.lock
|
CONNTRACKD_LOCK=/var/lock/conntrack.lock
|
||||||
|
|||||||
@ -1,19 +1,20 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
# Copyright 2012 Citrix Systems, Inc. Licensed under the
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
# Apache License, Version 2.0 (the "License"); you may not use this
|
# or more contributor license agreements. See the NOTICE file
|
||||||
# file except in compliance with the License. Citrix Systems, Inc.
|
# distributed with this work for additional information
|
||||||
# reserves all rights not expressly granted by the License.
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
# to you under the Apache License, Version 2.0 (the
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
# "License"); you may not use this file except in compliance
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
# with the License. You may obtain a copy of the License at
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
#
|
||||||
# See the License for the specific language governing permissions and
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
# limitations under the License.
|
#
|
||||||
#
|
# Unless required by applicable law or agreed to in writing,
|
||||||
# Automatically generated by addcopyright.py at 04/03/2012
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,18 +1,20 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Copyright 2012 Citrix Systems, Inc. Licensed under the
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
# Apache License, Version 2.0 (the "License"); you may not use this
|
# or more contributor license agreements. See the NOTICE file
|
||||||
# file except in compliance with the License. Citrix Systems, Inc.
|
# distributed with this work for additional information
|
||||||
# reserves all rights not expressly granted by the License.
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
# to you under the Apache License, Version 2.0 (the
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
# "License"); you may not use this file except in compliance
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
# with the License. You may obtain a copy of the License at
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
#
|
||||||
# See the License for the specific language governing permissions and
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
# limitations under the License.
|
#
|
||||||
#
|
# Unless required by applicable law or agreed to in writing,
|
||||||
# Automatically generated by addcopyright.py at 04/03/2012
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,18 +1,20 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Copyright 2012 Citrix Systems, Inc. Licensed under the
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
# Apache License, Version 2.0 (the "License"); you may not use this
|
# or more contributor license agreements. See the NOTICE file
|
||||||
# file except in compliance with the License. Citrix Systems, Inc.
|
# distributed with this work for additional information
|
||||||
# reserves all rights not expressly granted by the License.
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
# to you under the Apache License, Version 2.0 (the
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
# "License"); you may not use this file except in compliance
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
# with the License. You may obtain a copy of the License at
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
#
|
||||||
# See the License for the specific language governing permissions and
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
# limitations under the License.
|
#
|
||||||
#
|
# Unless required by applicable law or agreed to in writing,
|
||||||
# Automatically generated by addcopyright.py at 04/03/2012
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,18 +1,20 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Copyright 2012 Citrix Systems, Inc. Licensed under the
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
# Apache License, Version 2.0 (the "License"); you may not use this
|
# or more contributor license agreements. See the NOTICE file
|
||||||
# file except in compliance with the License. Citrix Systems, Inc.
|
# distributed with this work for additional information
|
||||||
# reserves all rights not expressly granted by the License.
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
# to you under the Apache License, Version 2.0 (the
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
# "License"); you may not use this file except in compliance
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
# with the License. You may obtain a copy of the License at
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
#
|
||||||
# See the License for the specific language governing permissions and
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
# limitations under the License.
|
#
|
||||||
#
|
# Unless required by applicable law or agreed to in writing,
|
||||||
# Automatically generated by addcopyright.py at 04/03/2012
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,15 +1,21 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
#Copyright 2012 Citrix Systems, Inc. Licensed under the
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
#Apache License, Version 2.0 (the "License"); you may not use this
|
# or more contributor license agreements. See the NOTICE file
|
||||||
#file except in compliance with the License. Citrix Systems, Inc.
|
# distributed with this work for additional information
|
||||||
#reserves all rights not expressly granted by the License.
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
#You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
# to you under the Apache License, Version 2.0 (the
|
||||||
#Unless required by applicable law or agreed to in writing, software
|
# "License"); you may not use this file except in compliance
|
||||||
#distributed under the License is distributed on an "AS IS" BASIS,
|
# with the License. You may obtain a copy of the License at
|
||||||
#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
#
|
||||||
#See the License for the specific language governing permissions and
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
#limitations under the License.
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing,
|
||||||
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
LANG="C"
|
LANG="C"
|
||||||
export LANG
|
export LANG
|
||||||
|
|||||||
@ -1,15 +1,21 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
|
|
||||||
#Copyright 2012 Citrix Systems, Inc. Licensed under the
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
#Apache License, Version 2.0 (the "License"); you may not use this
|
# or more contributor license agreements. See the NOTICE file
|
||||||
#file except in compliance with the License. Citrix Systems, Inc.
|
# distributed with this work for additional information
|
||||||
#reserves all rights not expressly granted by the License.
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
#You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
# to you under the Apache License, Version 2.0 (the
|
||||||
#Unless required by applicable law or agreed to in writing, software
|
# "License"); you may not use this file except in compliance
|
||||||
#distributed under the License is distributed on an "AS IS" BASIS,
|
# with the License. You may obtain a copy of the License at
|
||||||
#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
#
|
||||||
#See the License for the specific language governing permissions and
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
#limitations under the License.
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing,
|
||||||
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
# Script to write information about the current distribution to stdout or a file.
|
# Script to write information about the current distribution to stdout or a file.
|
||||||
# Information collected:
|
# Information collected:
|
||||||
|
|||||||
@ -1,15 +1,21 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
#Copyright 2012 Citrix Systems, Inc. Licensed under the
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
#Apache License, Version 2.0 (the "License"); you may not use this
|
# or more contributor license agreements. See the NOTICE file
|
||||||
#file except in compliance with the License. Citrix Systems, Inc.
|
# distributed with this work for additional information
|
||||||
#reserves all rights not expressly granted by the License.
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
#You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
# to you under the Apache License, Version 2.0 (the
|
||||||
#Unless required by applicable law or agreed to in writing, software
|
# "License"); you may not use this file except in compliance
|
||||||
#distributed under the License is distributed on an "AS IS" BASIS,
|
# with the License. You may obtain a copy of the License at
|
||||||
#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
#
|
||||||
#See the License for the specific language governing permissions and
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
#limitations under the License.
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing,
|
||||||
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
# Script to write information about the guest to XenStore.
|
# Script to write information about the guest to XenStore.
|
||||||
#
|
#
|
||||||
|
|||||||
@ -1,13 +1,19 @@
|
|||||||
/*Copyright 2012 Citrix Systems, Inc. Licensed under the
|
// Licensed to the Apache Software Foundation (ASF) under one
|
||||||
Apache License, Version 2.0 (the "License"); you may not use this
|
// or more contributor license agreements. See the NOTICE file
|
||||||
file except in compliance with the License. Citrix Systems, Inc.
|
// distributed with this work for additional information
|
||||||
reserves all rights not expressly granted by the License.
|
// regarding copyright ownership. The ASF licenses this file
|
||||||
You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
// to you under the Apache License, Version 2.0 (the
|
||||||
Unless required by applicable law or agreed to in writing, software
|
// "License"); you may not use this file except in compliance
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
// with the License. You may obtain a copy of the License at
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
//
|
||||||
See the License for the specific language governing permissions and
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
limitations under the License.*/
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing,
|
||||||
|
// software distributed under the License is distributed on an
|
||||||
|
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
// KIND, either express or implied. See the License for the
|
||||||
|
// specific language governing permissions and limitations
|
||||||
|
// under the License.
|
||||||
|
|
||||||
package com.cloud.upgrade.dao;
|
package com.cloud.upgrade.dao;
|
||||||
|
|
||||||
|
|||||||
@ -1,290 +1,300 @@
|
|||||||
# Copyright 2012 Citrix Systems, Inc. Licensed under the
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
# Apache License, Version 2.0 (the "License"); you may not use this
|
# or more contributor license agreements. See the NOTICE file
|
||||||
# file except in compliance with the License. Citrix Systems, Inc.
|
# distributed with this work for additional information
|
||||||
# reserves all rights not expressly granted by the License.
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
# to you under the Apache License, Version 2.0 (the
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
# "License"); you may not use this file except in compliance
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
# with the License. You may obtain a copy of the License at
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
#
|
#
|
||||||
# Automatically generated by addcopyright.py at 04/03/2012
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
from optparse import OptionParser
|
# Unless required by applicable law or agreed to in writing,
|
||||||
import sys
|
# software distributed under the License is distributed on an
|
||||||
import os, os.path
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
import fnmatch
|
# KIND, either express or implied. See the License for the
|
||||||
import time
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
class CopyRightDetecter(object):
|
|
||||||
def isCopyRightLine(self, txt):
|
from optparse import OptionParser
|
||||||
return False
|
import sys
|
||||||
|
import os, os.path
|
||||||
class KeyWordCopyRightDetecter(CopyRightDetecter):
|
import fnmatch
|
||||||
keywords = ['Cloud.com', 'Copyright', '(C)', '2011', 'Citrix', 'Systems', 'Inc', 'All', 'rights', 'reserved', 'This', 'software', 'is', 'licensed', 'under', 'the',
|
import time
|
||||||
'GNU', 'General', 'Public', 'License', 'v3', 'or', 'later', 'It', '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',
|
class CopyRightDetecter(object):
|
||||||
'version', '3', 'of', 'the', 'License', 'or', 'any', 'later', 'version', 'This', 'program', 'is', 'distributed', 'in', 'the', 'hope', 'that', 'it', 'will',
|
def isCopyRightLine(self, txt):
|
||||||
'be', 'useful', 'but', 'WITHOUT', 'ANY', 'WARRANTY;', 'without', 'even', 'the', 'implied', 'warranty', 'of', 'MERCHANTABILITY', 'or', 'FITNESS', 'FOR', 'A',
|
return False
|
||||||
'PARTICULAR', 'PURPOSE', 'See', 'the', 'GNU', 'General', 'Public', 'License', 'for', 'more', 'details', 'You', 'should', 'have', 'received', 'a', 'copy', 'of',
|
|
||||||
'the', 'GNU', 'General', 'Public', 'License', 'along', 'with', 'this', 'program', 'If', 'not', 'see', '<http://www.gnu.org/licenses/>', 'Version', '2', 'only',
|
class KeyWordCopyRightDetecter(CopyRightDetecter):
|
||||||
'("GPL")', 'Common', 'Development', 'and', 'Distribution', 'License("CDDL")', '(collectively', 'License").', 'language', 'governing', 'permissions', 'limitations',
|
keywords = ['Cloud.com', 'Copyright', '(C)', '2011', 'Citrix', 'Systems', 'Inc', 'All', 'rights', 'reserved', 'This', 'software', 'is', 'licensed', 'under', 'the',
|
||||||
'License.', '-', 'When', 'distributing', 'include', 'Header', 'Notice', 'each', 'file', 'at', 'glassfish/bootstrap/legal/LICENSE.txt.', 'Sun', 'designates',
|
'GNU', 'General', 'Public', 'License', 'v3', 'or', 'later', 'It', 'is', 'free', 'software:', 'you', 'can', 'redistribute', 'it', 'and/or', 'modify', 'it',
|
||||||
'particular', 'subject', 'to', 'Classpath', 'exception', 'provided', 'GPL', 'section', 'accompanied', 'code.', 'applicable', 'add', 'following', 'below',
|
'under', 'the', 'terms', 'of', 'the', 'GNU', 'General', 'Public', 'License', 'as', 'published', 'by', 'the', 'Free', 'Software', 'Foundation', 'either',
|
||||||
'fields', 'enclosed', 'brackets', 'replaced', 'your', 'own', 'identifying', 'information', 'Portions', 'Copyrighted', 'year', 'name', 'copyright', 'owner]',
|
'version', '3', 'of', 'the', 'License', 'or', 'any', 'later', 'version', 'This', 'program', 'is', 'distributed', 'in', 'the', 'hope', 'that', 'it', 'will',
|
||||||
'Contributor(s)', 'indicate', 'decision', 'adding', '[Contributor', 'elects', 'distribution', 'CDDL', 'license.', "don't", 'single', 'choice', 'license',
|
'be', 'useful', 'but', 'WITHOUT', 'ANY', 'WARRANTY;', 'without', 'even', 'the', 'implied', 'warranty', 'of', 'MERCHANTABILITY', 'or', 'FITNESS', 'FOR', 'A',
|
||||||
'recipient', 'has', 'option', 'distribute', 'extend', 'its', 'licensees', 'above.', 'However', 'if', 'code', 'therefore', 'elected', 'then', 'applies', 'new',
|
'PARTICULAR', 'PURPOSE', 'See', 'the', 'GNU', 'General', 'Public', 'License', 'for', 'more', 'details', 'You', 'should', 'have', 'received', 'a', 'copy', 'of',
|
||||||
'made', 'such', 'holder.']
|
'the', 'GNU', 'General', 'Public', 'License', 'along', 'with', 'this', 'program', 'If', 'not', 'see', '<http://www.gnu.org/licenses/>', 'Version', '2', 'only',
|
||||||
|
'("GPL")', 'Common', 'Development', 'and', 'Distribution', 'License("CDDL")', '(collectively', 'License").', 'language', 'governing', 'permissions', 'limitations',
|
||||||
def isCopyRightLine(self, txt):
|
'License.', '-', 'When', 'distributing', 'include', 'Header', 'Notice', 'each', 'file', 'at', 'glassfish/bootstrap/legal/LICENSE.txt.', 'Sun', 'designates',
|
||||||
words = [ c.strip().strip('.').strip('\n').strip(',').strip() for c in txt.split(" ") ]
|
'particular', 'subject', 'to', 'Classpath', 'exception', 'provided', 'GPL', 'section', 'accompanied', 'code.', 'applicable', 'add', 'following', 'below',
|
||||||
total = len(words)
|
'fields', 'enclosed', 'brackets', 'replaced', 'your', 'own', 'identifying', 'information', 'Portions', 'Copyrighted', 'year', 'name', 'copyright', 'owner]',
|
||||||
if total == 0: return False
|
'Contributor(s)', 'indicate', 'decision', 'adding', '[Contributor', 'elects', 'distribution', 'CDDL', 'license.', "don't", 'single', 'choice', 'license',
|
||||||
|
'recipient', 'has', 'option', 'distribute', 'extend', 'its', 'licensees', 'above.', 'However', 'if', 'code', 'therefore', 'elected', 'then', 'applies', 'new',
|
||||||
numKeyWord = 0
|
'made', 'such', 'holder.']
|
||||||
for w in words:
|
|
||||||
if w == "": continue
|
def isCopyRightLine(self, txt):
|
||||||
if w in self.keywords: numKeyWord+=1
|
words = [ c.strip().strip('.').strip('\n').strip(',').strip() for c in txt.split(" ") ]
|
||||||
|
total = len(words)
|
||||||
if float(numKeyWord)/float(total) >= float(1)/float(2): return True
|
if total == 0: return False
|
||||||
return False
|
|
||||||
|
numKeyWord = 0
|
||||||
copyRightDetectingFactory = {"KeyWord":KeyWordCopyRightDetecter.__name__}
|
for w in words:
|
||||||
|
if w == "": continue
|
||||||
logfd = open("/tmp/addcopyright.log", 'w')
|
if w in self.keywords: numKeyWord+=1
|
||||||
class Logger(object):
|
|
||||||
@staticmethod
|
if float(numKeyWord)/float(total) >= float(1)/float(2): return True
|
||||||
def info(msg):
|
return False
|
||||||
sys.stdout.write("INFO: %s"%msg)
|
|
||||||
sys.stdout.write("\n")
|
copyRightDetectingFactory = {"KeyWord":KeyWordCopyRightDetecter.__name__}
|
||||||
sys.stdout.flush()
|
|
||||||
|
logfd = open("/tmp/addcopyright.log", 'w')
|
||||||
@staticmethod
|
class Logger(object):
|
||||||
def debug(msg):
|
@staticmethod
|
||||||
logfd.write("DEBUG: %s"%msg)
|
def info(msg):
|
||||||
logfd.write("\n")
|
sys.stdout.write("INFO: %s"%msg)
|
||||||
|
sys.stdout.write("\n")
|
||||||
@staticmethod
|
sys.stdout.flush()
|
||||||
def warn(msg):
|
|
||||||
sys.stdout.write("WARNNING: %s"%msg)
|
@staticmethod
|
||||||
sys.stdout.write("\n")
|
def debug(msg):
|
||||||
sys.stdout.flush()
|
logfd.write("DEBUG: %s"%msg)
|
||||||
|
logfd.write("\n")
|
||||||
@staticmethod
|
|
||||||
def error(msg):
|
@staticmethod
|
||||||
sys.stderr.write("ERROR: %s"%msg)
|
def warn(msg):
|
||||||
sys.stderr.write("\n")
|
sys.stdout.write("WARNNING: %s"%msg)
|
||||||
sys.stderr.flush()
|
sys.stdout.write("\n")
|
||||||
|
sys.stdout.flush()
|
||||||
|
|
||||||
class Adder(object):
|
@staticmethod
|
||||||
defaultTxt = '''Copyright 2012 Citrix Systems, Inc. Licensed under the
|
def error(msg):
|
||||||
Apache License, Version 2.0 (the "License"); you may not use this
|
sys.stderr.write("ERROR: %s"%msg)
|
||||||
file except in compliance with the License. Citrix Systems, Inc.
|
sys.stderr.write("\n")
|
||||||
reserves all rights not expressly granted by the License.
|
sys.stderr.flush()
|
||||||
You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
class Adder(object):
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
defaultTxt = '''Licensed to the Apache Software Foundation (ASF) under one
|
||||||
See the License for the specific language governing permissions and
|
or more contributor license agreements. See the NOTICE file
|
||||||
limitations under the License.
|
distributed with this work for additional information
|
||||||
'''
|
regarding copyright ownership. The ASF licenses this file
|
||||||
|
to you under the Apache License, Version 2.0 (the
|
||||||
copyRightTxt = None
|
"License"); you may not use this file except in compliance
|
||||||
targetFile = None
|
with the License. You may obtain a copy of the License at
|
||||||
fileBody = None
|
|
||||||
decter = None
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
signature = 'Automatically generated by addcopyright.py at %s' % time.strftime("%m/%d/%Y", time.localtime())
|
|
||||||
|
Unless required by applicable law or agreed to in writing,
|
||||||
COMMENT_NOTATION = ""
|
software distributed under the License is distributed on an
|
||||||
|
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
def __init__(self):
|
KIND, either express or implied. See the License for the
|
||||||
self.decter = eval(copyRightDetectingFactory["KeyWord"])()
|
specific language governing permissions and limitations
|
||||||
|
under the License.
|
||||||
def setTargetFile(self, fpath):
|
'''
|
||||||
self.targetFile = fpath
|
|
||||||
if not os.path.exists(self.targetFile):
|
copyRightTxt = None
|
||||||
raise Exception("Cannot find %s"%self.targetFile)
|
targetFile = None
|
||||||
|
fileBody = None
|
||||||
def setCopyRightTxt(self, txt):
|
decter = None
|
||||||
self.copyRightTxt = txt.split("\n")
|
signature = 'Automatically generated by addcopyright.py at %s' % time.strftime("%m/%d/%Y", time.localtime())
|
||||||
|
|
||||||
def checkParams(self):
|
COMMENT_NOTATION = ""
|
||||||
assert self.targetFile != None, "Target file not set"
|
|
||||||
if self.copyRightTxt == None:
|
def __init__(self):
|
||||||
self.copyRightTxt = self.defaultTxt.split("\n")
|
self.decter = eval(copyRightDetectingFactory["KeyWord"])()
|
||||||
|
|
||||||
def pasteCopyRight(self):
|
def setTargetFile(self, fpath):
|
||||||
self.fileBody = self.copyRightTxt + self.fileBody
|
self.targetFile = fpath
|
||||||
file(self.targetFile, 'w').write("".join(self.fileBody))
|
if not os.path.exists(self.targetFile):
|
||||||
Logger.info("Added copyright header to %s"%self.targetFile)
|
raise Exception("Cannot find %s"%self.targetFile)
|
||||||
|
|
||||||
def composeCopyRight(self):
|
def setCopyRightTxt(self, txt):
|
||||||
l = self.copyRightTxt
|
self.copyRightTxt = txt.split("\n")
|
||||||
l.append(self.signature)
|
|
||||||
l = [ self.COMMENT_NOTATION + " " + line + "\n" for line in l ]
|
def checkParams(self):
|
||||||
self.copyRightTxt = l
|
assert self.targetFile != None, "Target file not set"
|
||||||
|
if self.copyRightTxt == None:
|
||||||
def getFileBody(self):
|
self.copyRightTxt = self.defaultTxt.split("\n")
|
||||||
self.fileBody = file(self.targetFile).readlines()
|
|
||||||
|
def pasteCopyRight(self):
|
||||||
def isCommentLine(self, line):
|
self.fileBody = self.copyRightTxt + self.fileBody
|
||||||
if line.strip().startswith(self.COMMENT_NOTATION):
|
file(self.targetFile, 'w').write("".join(self.fileBody))
|
||||||
return True
|
Logger.info("Added copyright header to %s"%self.targetFile)
|
||||||
return False
|
|
||||||
|
def composeCopyRight(self):
|
||||||
def removeOldCopyRight(self):
|
l = self.copyRightTxt
|
||||||
newBody = []
|
l.append(self.signature)
|
||||||
removed = False
|
l = [ self.COMMENT_NOTATION + " " + line + "\n" for line in l ]
|
||||||
for line in self.fileBody[0:50]:
|
self.copyRightTxt = l
|
||||||
if self.isCommentLine(line) and self.decter.isCopyRightLine(line):
|
|
||||||
removed = True
|
def getFileBody(self):
|
||||||
Logger.debug("remove old copyright: %s" % line)
|
self.fileBody = file(self.targetFile).readlines()
|
||||||
continue
|
|
||||||
newBody.append(line)
|
def isCommentLine(self, line):
|
||||||
|
if line.strip().startswith(self.COMMENT_NOTATION):
|
||||||
self.fileBody = newBody + self.fileBody[50:]
|
return True
|
||||||
if removed:
|
return False
|
||||||
Logger.info("Removed old copyright header of %s"%self.targetFile)
|
|
||||||
|
def removeOldCopyRight(self):
|
||||||
def cleanBlankComment(self):
|
newBody = []
|
||||||
newBody = []
|
removed = False
|
||||||
for l in self.fileBody[0:50]:
|
for line in self.fileBody[0:50]:
|
||||||
if self.isCommentLine(l) and l.strip().strip(self.COMMENT_NOTATION).strip().strip('\n') == "":
|
if self.isCommentLine(line) and self.decter.isCopyRightLine(line):
|
||||||
Logger.debug("Blank Comment: %s" % l)
|
removed = True
|
||||||
continue
|
Logger.debug("remove old copyright: %s" % line)
|
||||||
newBody.append(l)
|
continue
|
||||||
self.fileBody = newBody + self.fileBody[50:]
|
newBody.append(line)
|
||||||
|
|
||||||
def doWork(self):
|
self.fileBody = newBody + self.fileBody[50:]
|
||||||
self.checkParams()
|
if removed:
|
||||||
self.getFileBody()
|
Logger.info("Removed old copyright header of %s"%self.targetFile)
|
||||||
self.removeOldCopyRight()
|
|
||||||
self.composeCopyRight()
|
def cleanBlankComment(self):
|
||||||
self.cleanBlankComment()
|
newBody = []
|
||||||
self.pasteCopyRight()
|
for l in self.fileBody[0:50]:
|
||||||
|
if self.isCommentLine(l) and l.strip().strip(self.COMMENT_NOTATION).strip().strip('\n') == "":
|
||||||
|
Logger.debug("Blank Comment: %s" % l)
|
||||||
class SqlAdder(Adder):
|
continue
|
||||||
def __init__(self):
|
newBody.append(l)
|
||||||
super(SqlAdder, self).__init__()
|
self.fileBody = newBody + self.fileBody[50:]
|
||||||
self.COMMENT_NOTATION = "#"
|
|
||||||
|
def doWork(self):
|
||||||
class InterpreterAdder(Adder):
|
self.checkParams()
|
||||||
def __init__(self):
|
self.getFileBody()
|
||||||
super(InterpreterAdder, self).__init__()
|
self.removeOldCopyRight()
|
||||||
self.COMMENT_NOTATION = "#"
|
self.composeCopyRight()
|
||||||
|
self.cleanBlankComment()
|
||||||
def pasteCopyRight(self):
|
self.pasteCopyRight()
|
||||||
if len(self.fileBody) > 0 and self.isCommentLine(self.fileBody[0]):
|
|
||||||
# Don't cover the first line of interpreter comment
|
|
||||||
self.fileBody = [self.fileBody[0]] + self.copyRightTxt + self.fileBody[1:]
|
class SqlAdder(Adder):
|
||||||
else:
|
def __init__(self):
|
||||||
self.fileBody = self.copyRightTxt + self.fileBody
|
super(SqlAdder, self).__init__()
|
||||||
file(self.targetFile, 'w').write("".join(self.fileBody))
|
self.COMMENT_NOTATION = "#"
|
||||||
Logger.info("Added copyright header to %s"%self.targetFile)
|
|
||||||
|
class InterpreterAdder(Adder):
|
||||||
class JavaAdder(Adder):
|
def __init__(self):
|
||||||
commentOn = False
|
super(InterpreterAdder, self).__init__()
|
||||||
|
self.COMMENT_NOTATION = "#"
|
||||||
def __init__(self):
|
|
||||||
super(JavaAdder, self).__init__()
|
def pasteCopyRight(self):
|
||||||
self.COMMENT_NOTATION = '//'
|
if len(self.fileBody) > 0 and self.isCommentLine(self.fileBody[0]):
|
||||||
|
# Don't cover the first line of interpreter comment
|
||||||
def isCommentLine(self, line):
|
self.fileBody = [self.fileBody[0]] + self.copyRightTxt + self.fileBody[1:]
|
||||||
if line.strip().startswith('//'):
|
else:
|
||||||
return True
|
self.fileBody = self.copyRightTxt + self.fileBody
|
||||||
elif line.strip().startswith('/*'):
|
file(self.targetFile, 'w').write("".join(self.fileBody))
|
||||||
self.commentOn = True
|
Logger.info("Added copyright header to %s"%self.targetFile)
|
||||||
return True
|
|
||||||
elif self.commentOn == True and line.find('*/') != -1:
|
class JavaAdder(Adder):
|
||||||
self.commentOn = False
|
commentOn = False
|
||||||
return True
|
|
||||||
elif self.commentOn:
|
def __init__(self):
|
||||||
return True
|
super(JavaAdder, self).__init__()
|
||||||
else:
|
self.COMMENT_NOTATION = '//'
|
||||||
return False
|
|
||||||
|
def isCommentLine(self, line):
|
||||||
def cleanBlankComment(self):
|
if line.strip().startswith('//'):
|
||||||
#TODO
|
return True
|
||||||
pass
|
elif line.strip().startswith('/*'):
|
||||||
|
self.commentOn = True
|
||||||
|
return True
|
||||||
copyRightAdderFactory = {".sql":SqlAdder.__name__, ".sh":InterpreterAdder.__name__, ".py":InterpreterAdder.__name__}
|
elif self.commentOn == True and line.find('*/') != -1:
|
||||||
class CopyRightAdder(object):
|
self.commentOn = False
|
||||||
parser = None
|
return True
|
||||||
options = None
|
elif self.commentOn:
|
||||||
args = None
|
return True
|
||||||
targetFiles = None
|
else:
|
||||||
excludeFiles = None
|
return False
|
||||||
copyRightFileTxt = None
|
|
||||||
rootDir = None
|
def cleanBlankComment(self):
|
||||||
|
#TODO
|
||||||
def errAndExit(self, msg):
|
pass
|
||||||
Logger.error(msg)
|
|
||||||
Logger.info("addcopyright -h for help")
|
|
||||||
sys.exit(1)
|
copyRightAdderFactory = {".sql":SqlAdder.__name__, ".sh":InterpreterAdder.__name__, ".py":InterpreterAdder.__name__}
|
||||||
|
class CopyRightAdder(object):
|
||||||
def __init__(self):
|
parser = None
|
||||||
usage = '''Usage: addcopyright [file_name_pattern] [--exculdes=file_name_pattern] [--file=copyright_file] [--root=root_dir_of_files_to_add_header] [--replace]
|
options = None
|
||||||
Examples:
|
args = None
|
||||||
addcopyright
|
targetFiles = None
|
||||||
addcopyright *.sql
|
excludeFiles = None
|
||||||
addcopyright *.sql --excludes="*.sql~"
|
copyRightFileTxt = None
|
||||||
addcopyright *.sql --file=/root/Citrix.copyright
|
rootDir = None
|
||||||
addcopyright *.sql --file=/root/Citrix.copyright --root=~/cloudstack-oss
|
|
||||||
'''
|
def errAndExit(self, msg):
|
||||||
self.parser = OptionParser(usage=usage)
|
Logger.error(msg)
|
||||||
self.parser.add_option("", "--excludes", action="store", type="string", dest="excludes", default="",
|
Logger.info("addcopyright -h for help")
|
||||||
help="Exclude these files when adding copyright header")
|
sys.exit(1)
|
||||||
self.parser.add_option("", "--file", action="store", type="string", dest="copyRightFile", default="",
|
|
||||||
help="Path to copyright header file. Default to Citrix copyright header")
|
def __init__(self):
|
||||||
self.parser.add_option("", "--root", action="store", type="string", dest="rootDir", default="",
|
usage = '''Usage: addcopyright [file_name_pattern] [--exculdes=file_name_pattern] [--file=copyright_file] [--root=root_dir_of_files_to_add_header] [--replace]
|
||||||
help="Root folder where files being added copyright header locate. Default to current directory")
|
Examples:
|
||||||
(self.options, self.args) = self.parser.parse_args()
|
addcopyright
|
||||||
if len(self.args) > 1:
|
addcopyright *.sql
|
||||||
self.errAndExit("Invalid arguments:%s" % self.args)
|
addcopyright *.sql --excludes="*.sql~"
|
||||||
|
addcopyright *.sql --file=/root/Citrix.copyright
|
||||||
if len(self.args) == 1:
|
addcopyright *.sql --file=/root/Citrix.copyright --root=~/cloudstack-oss
|
||||||
self.targetFiles = self.args[0]
|
'''
|
||||||
if self.options.excludes != "":
|
self.parser = OptionParser(usage=usage)
|
||||||
self.excludeFiles = self.options.excludes
|
self.parser.add_option("", "--excludes", action="store", type="string", dest="excludes", default="",
|
||||||
if self.options.copyRightFile != "":
|
help="Exclude these files when adding copyright header")
|
||||||
self.copyRightFileTxt = file(self.options.copyRightFile).read()
|
self.parser.add_option("", "--file", action="store", type="string", dest="copyRightFile", default="",
|
||||||
if self.options.rootDir != "":
|
help="Path to copyright header file. Default to Citrix copyright header")
|
||||||
self.rootDir = os.path.expanduser(self.options.rootDir)
|
self.parser.add_option("", "--root", action="store", type="string", dest="rootDir", default="",
|
||||||
if not os.path.isdir(self.rootDir): raise Exception("Cannot find directory %s"%self.rootDir)
|
help="Root folder where files being added copyright header locate. Default to current directory")
|
||||||
else:
|
(self.options, self.args) = self.parser.parse_args()
|
||||||
self.rootDir = os.getcwd()
|
if len(self.args) > 1:
|
||||||
|
self.errAndExit("Invalid arguments:%s" % self.args)
|
||||||
def createConcreteAdder(self, filename):
|
|
||||||
(x, ext) = os.path.splitext(filename)
|
if len(self.args) == 1:
|
||||||
if not copyRightAdderFactory.has_key(ext): return None
|
self.targetFiles = self.args[0]
|
||||||
return eval(copyRightAdderFactory[ext])()
|
if self.options.excludes != "":
|
||||||
|
self.excludeFiles = self.options.excludes
|
||||||
def run(self):
|
if self.options.copyRightFile != "":
|
||||||
for root, dirs, files in os.walk(self.rootDir):
|
self.copyRightFileTxt = file(self.options.copyRightFile).read()
|
||||||
for f in files:
|
if self.options.rootDir != "":
|
||||||
fpath = os.path.join(root, f)
|
self.rootDir = os.path.expanduser(self.options.rootDir)
|
||||||
if self.excludeFiles != None and fnmatch.fnmatch(f, self.excludeFiles):
|
if not os.path.isdir(self.rootDir): raise Exception("Cannot find directory %s"%self.rootDir)
|
||||||
Logger.info("Skipping excluded file %s" % fpath)
|
else:
|
||||||
continue
|
self.rootDir = os.getcwd()
|
||||||
if self.targetFiles != None and not fnmatch.fnmatch(f, self.targetFiles):
|
|
||||||
Logger.info("Skipping %s not matching our file name pattern" % fpath)
|
def createConcreteAdder(self, filename):
|
||||||
continue
|
(x, ext) = os.path.splitext(filename)
|
||||||
|
if not copyRightAdderFactory.has_key(ext): return None
|
||||||
adder = self.createConcreteAdder(f)
|
return eval(copyRightAdderFactory[ext])()
|
||||||
if adder == None:
|
|
||||||
Logger.warn("Cannot find a proper copyright Adder for %s, skip it" % fpath)
|
def run(self):
|
||||||
continue
|
for root, dirs, files in os.walk(self.rootDir):
|
||||||
|
for f in files:
|
||||||
adder.setTargetFile(fpath)
|
fpath = os.path.join(root, f)
|
||||||
if self.copyRightFileTxt != None:
|
if self.excludeFiles != None and fnmatch.fnmatch(f, self.excludeFiles):
|
||||||
adder.setCopyRightTxt(self.copyRightFileTxt)
|
Logger.info("Skipping excluded file %s" % fpath)
|
||||||
adder.doWork()
|
continue
|
||||||
|
if self.targetFiles != None and not fnmatch.fnmatch(f, self.targetFiles):
|
||||||
|
Logger.info("Skipping %s not matching our file name pattern" % fpath)
|
||||||
if __name__ == '__main__':
|
continue
|
||||||
task = CopyRightAdder()
|
|
||||||
task.run()
|
adder = self.createConcreteAdder(f)
|
||||||
|
if adder == None:
|
||||||
|
Logger.warn("Cannot find a proper copyright Adder for %s, skip it" % fpath)
|
||||||
|
continue
|
||||||
|
|
||||||
|
adder.setTargetFile(fpath)
|
||||||
|
if self.copyRightFileTxt != None:
|
||||||
|
adder.setCopyRightTxt(self.copyRightFileTxt)
|
||||||
|
adder.doWork()
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
task = CopyRightAdder()
|
||||||
|
task.run()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user