diff options
author | CNlucius <lukai1@huawei.com> | 2016-09-13 11:40:12 +0800 |
---|---|---|
committer | CNlucius <lukai1@huawei.com> | 2016-09-13 11:41:53 +0800 |
commit | b731e2f1dd0972409b136aebc7b463dd72c9cfad (patch) | |
tree | 5107d7d80c19ad8076c2c97c2b5ef8d1cf3ab903 /framework/src/onos/tools/package/deb | |
parent | ee93993458266114c29271a481ef9ce7ce621b2a (diff) |
ONOSFW-171
O/S-SFC-ONOS scenario documentation
Change-Id: I51ae1cf736ea24ab6680f8edca1b2bf5dd598365
Signed-off-by: CNlucius <lukai1@huawei.com>
Diffstat (limited to 'framework/src/onos/tools/package/deb')
-rw-r--r-- | framework/src/onos/tools/package/deb/control | 8 | ||||
-rw-r--r-- | framework/src/onos/tools/package/deb/copyright | 20 | ||||
-rwxr-xr-x | framework/src/onos/tools/package/deb/postinst | 16 | ||||
-rwxr-xr-x | framework/src/onos/tools/package/deb/postrm | 5 | ||||
-rwxr-xr-x | framework/src/onos/tools/package/deb/prerm | 23 |
5 files changed, 0 insertions, 72 deletions
diff --git a/framework/src/onos/tools/package/deb/control b/framework/src/onos/tools/package/deb/control deleted file mode 100644 index c581ac25..00000000 --- a/framework/src/onos/tools/package/deb/control +++ /dev/null @@ -1,8 +0,0 @@ -Package: onos -Architecture: all -Maintainer: ONOS Project -Depends: debconf (>= 0.5.00), default-jre-headless (>= 1.8) | openjdk-8-jre | oracle-java8-installer -Priority: optional -Version: @ONOS_POM_VERSION -Description: Open Network Operating System (ONOS) - Open Network Operating System (ONOS) is an opensource SDN controller. diff --git a/framework/src/onos/tools/package/deb/copyright b/framework/src/onos/tools/package/deb/copyright deleted file mode 100644 index 09ec05e3..00000000 --- a/framework/src/onos/tools/package/deb/copyright +++ /dev/null @@ -1,20 +0,0 @@ -Upstream-Name: onos -Source: http://github.com/opennetworkinglab/onos - -Files: * -Copyright: 2014-2015 Open Networking Laboratory -License: Apache 2.0 - 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. - . - On Debian systems, the complete text of the Apache License 2.0 can - be found in "/usr/share/common-licenses/Apache-2.0" diff --git a/framework/src/onos/tools/package/deb/postinst b/framework/src/onos/tools/package/deb/postinst deleted file mode 100755 index 60de14a7..00000000 --- a/framework/src/onos/tools/package/deb/postinst +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -ONOS_USER=sdn - -# Check to see if user exists, and if not, create a service account -getent passwd $ONOS_USER >/dev/null 2&>1 || ( useradd -M $ONOS_USER && usermod -L $ONOS_USER ) - -# Create ONOS options file -[ ! -f /opt/onos/options ] && cat << EOF > /opt/onos/options -export ONOS_OPTS=server -export ONOS_USER="$ONOS_USER" -EOF - -# Change permissions for onos directory -[ -d /opt/onos ] && chown -R $ONOS_USER.$ONOS_USER /opt/onos - diff --git a/framework/src/onos/tools/package/deb/postrm b/framework/src/onos/tools/package/deb/postrm deleted file mode 100755 index 90dd6164..00000000 --- a/framework/src/onos/tools/package/deb/postrm +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -# FIXME dpkg will remove /opt if it is empty after removing onos -# We should recreate /opt if it was deleted. -sudo mkdir -p /opt diff --git a/framework/src/onos/tools/package/deb/prerm b/framework/src/onos/tools/package/deb/prerm deleted file mode 100755 index 2a1633da..00000000 --- a/framework/src/onos/tools/package/deb/prerm +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -# Check if onos is running; if it is, stop onos -[ -z "$(status onos 2>/dev/null | grep start)" ] && echo "onos is not running." || ( - stop onos - - # Wait for onos to stop up to 5 seconds - for i in $(seq 1 5); do - [ -z "$(ps -ef | grep karaf.jar | grep -v grep)" ] && break - sleep 1 - done - [ -z "$(ps -ef | grep karaf.jar | grep -v grep)" ] && echo 'Stopped onos service' || echo 'Failed to stop onos' -) - -# Clean up onos runtime directories -# TODO don't hardcode karaf version -rm -rf /opt/onos/apache-karaf-3.0.3/ -rm -rf /opt/onos/var/* -rm -rf /opt/onos/config -rm -rf /opt/onos/options -rm -rf /opt/onos/log - -#TODO consider removing the sdn user if we created it |