-
Notifications
You must be signed in to change notification settings - Fork 0
/
entryscript.sh
executable file
·75 lines (69 loc) · 4.14 KB
/
entryscript.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#!/bin/bash
#
# Copyright 2022-present Open Networking Foundation
# Licensed 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.
#/
echo '[ ! -z "$TERM" -a -r /etc/banner ] && cat /etc/issue && cat /etc/banner' \
>> /etc/bash.bashrc \
; echo -e "
-----------------------------------------------------------
__ _______ _____ _____ _ _____
\ \ / / ____|/ ____| / ____| | |_ _|
\ \ / / | __| | | | | | | |
\ \/ /| | |_ | | | | | | | |
\ / | |__| | |____ | |____| |____ _| |_
\/ \_____|\_____| \_____|______|_____|
-----------------------------------------------------------
Welcome to VGC-CLI
-----------------------------------------------------------
"\
> /etc/banner
# ENVIRONMENT VARIABLES
echo "export KAFKA_ADAPTER_HOST=${KAFKA_ADAPTER_HOST}" >> /home/voltha-go-controller/.bash_profile
echo "export KAFKA_ADAPTER_PORT=9092" >> /home/voltha-go-controller/.bash_profile
echo "export KAFKA_CLUSTER_HOST=${KAFKA_CLUSTER_HOST}" >> /home/voltha-go-controller/.bash_profile
echo "export KAFKA_CLUSTER_PORT=9092" >> /home/voltha-go-controller/.bash_profile
echo "export KV_STORE_HOST=${KV_STORE_HOST}" >> /home/voltha-go-controller/.bash_profile
echo "export KV_STORE_PORT=${KV_STORE_PORT}" >> /home/voltha-go-controller/.bash_profile
echo "export KV_STORE_TYPE=redis" >> /home/voltha-go-controller/.bash_profile
echo "export VOLTHA_HOST=${VOLTHA_HOST}" >> /home/voltha-go-controller/.bash_profile
echo "export VOLTHA_PORT=${VOLTHA_PORT}" >> /home/voltha-go-controller/.bash_profile
echo "export KV_STORE_TIMEOUT=10" >> /home/voltha-go-controller/.bash_profile
echo "export BANNER=false" >> /home/voltha-go-controller/.bash_profile
# ALIAS FOR VGC COMMANDS
echo "alias flows='./vgcctl flows'" >> /home/voltha-go-controller/.bash_profile
echo "alias igmp='./vgcctl igmp'" >> /home/voltha-go-controller/.bash_profile
echo "alias mvlan='./vgcctl mvlan'" >> /home/voltha-go-controller/.bash_profile
echo "alias port='./vgcctl port'" >> /home/voltha-go-controller/.bash_profile
echo "alias service='./vgcctl service'" >> /home/voltha-go-controller/.bash_profile
echo "alias vnet='./vgcctl vnet'" >> /home/voltha-go-controller/.bash_profile
echo "alias vpvs='./vgcctl vpvs'" >> /home/voltha-go-controller/.bash_profile
echo "alias meter='./vgcctl meter'" >> /home/voltha-go-controller/.bash_profile
echo "alias group='./vgcctl group'" >> /home/voltha-go-controller/.bash_profile
echo "alias igmpgroup='./vgcctl igmpgroup'">> /home/voltha-go-controller/.bash_profile
echo "alias igmpchannel='./vgcctl igmpchannel'">> /home/voltha-go-controller/.bash_profile
echo "alias igmpdevice='./vgcctl igmpdevice'">>/home/voltha-go-controller/.bash_profile
echo "alias igmpport='./vgcctl igmpport'">>/home/voltha-go-controller/.bash_profile
echo "alias cacheicmp='./vgcctl cacheicmp'">>/home/voltha-go-controller/.bash_profile
echo "alias cachemvlan='./vgcctl cachemvlan'">>/home/voltha-go-controller/.bash_profile
echo "alias cacheport='./vgcctl cacheport'">>/home/voltha-go-controller/.bash_profile
echo "alias tasklist='./vgcctl tasklist'">>/home/voltha-go-controller/.bash_profile
echo "alias device='./vgcctl device'">>/home/voltha-go-controller/.bash_profile
echo "alias help='./vgcctl --help'">>/home/voltha-go-controller/.bash_profile
echo "alias dhcpsession='./vgcctl dhcpsession'">>/home/voltha-go-controller/.bash_profile
echo "alias ponports='./vgcctl ponports'">>/home/voltha-go-controller/.bash_profile
echo "alias mcast='./vgcctl mcast'" >> /home/voltha-go-controller/.bash_profile
chown voltha-go-controller.voltha-go-controller /home/voltha-go-controller/.bash_profile
ssh-keygen -A
/usr/sbin/sshd -D &
/home/voltha-go-controller/voltha-go-controller