Rework: Move fuel-astute patch to post-install.
[armband.git] / patches / opnfv-fuel / 0015-Remove-check-for-root.patch
1 From: Josep Puigdemont <josep.puigdemont@enea.com>
2 Date: Wed, 4 May 2016 14:27:23 +0200
3 Subject: [PATCH] Remove check for root
4
5 Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com>
6 ---
7  ci/deploy.sh                        | 5 -----
8  deploy/deploy-config.py             | 1 -
9  deploy/deploy.py                    | 2 --
10  deploy/environments/virtual_fuel.py | 2 --
11  4 files changed, 10 deletions(-)
12
13 diff --git a/ci/deploy.sh b/ci/deploy.sh
14 index cd7f652..5f06a19 100755
15 --- a/ci/deploy.sh
16 +++ b/ci/deploy.sh
17 @@ -204,11 +204,6 @@ do
18      esac
19  done
20  
21 -if [[ $EUID -ne 0 ]]; then
22 -    echo "This script must be run as root" 1>&2
23 -    exit 1
24 -fi
25 -
26  if [ -z $BASE_CONFIG_URI ] || [ -z $TARGET_LAB ] || \
27     [ -z $TARGET_POD ] || [ -z $DEPLOY_SCENARIO ] || \
28     [ -z $ISO ]; then
29 diff --git a/deploy/deploy-config.py b/deploy/deploy-config.py
30 index 65d51b2..88a1111 100644
31 --- a/deploy/deploy-config.py
32 +++ b/deploy/deploy-config.py
33 @@ -40,7 +40,6 @@ from common import (
34      check_file_exists,
35      create_dir_if_not_exists,
36      delete,
37 -    check_if_root,
38      ArgParser,
39  )
40  
41 diff --git a/deploy/deploy.py b/deploy/deploy.py
42 index 9db1754..ca092f5 100755
43 --- a/deploy/deploy.py
44 +++ b/deploy/deploy.py
45 @@ -32,7 +32,6 @@ from common import (
46      check_file_exists,
47      create_dir_if_not_exists,
48      delete,
49 -    check_if_root,
50      ArgParser,
51  )
52  
53 @@ -232,7 +231,6 @@ class AutoDeploy(object):
54          return 0
55  
56      def run(self):
57 -        check_if_root()
58          if self.cleanup_only:
59              self.cleanup_execution_environment()
60          else:
61 diff --git a/deploy/environments/virtual_fuel.py b/deploy/environments/virtual_fuel.py
62 index b1a76e4..4ff68f6 100644
63 --- a/deploy/environments/virtual_fuel.py
64 +++ b/deploy/environments/virtual_fuel.py
65 @@ -18,7 +18,6 @@ import time
66  from common import (
67      exec_cmd,
68      check_file_exists,
69 -    check_if_root,
70      delete,
71      log,
72  )
73 @@ -135,7 +134,6 @@ class VirtualFuel(ExecutionEnvironment):
74                         vm_definition_overwrite)
75  
76      def setup_environment(self):
77 -        check_if_root()
78          self.cleanup_environment()
79          self.create_vm()
80