fuel-plugin-contrail/deployment_scripts/puppet/modules/contrail/files/fixup-vrouter.init

42 lines
1.2 KiB
Bash

#! /bin/sh
### BEGIN INIT INFO
# Provides: fixup-vrouter
# Required-Start: $network contrail-vrouter-agent
# Required-Stop: $network contrail-vrouter-agent
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: fixup-vrouter
# Description: This file starts opencontrail vrouter fixup for kernels > 3.13.0-62
#
### END INIT INFO
# Copyright 2015 Mirantis, Inc.
#
# 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.
case "$1" in
start)
sleep 10
for i in `ip link | egrep 'pkt[0-9]' | awk -F': ' '{print $2}'`; do
ip link set dev $i up
done
;;
stop)
exit 0
;;
*)
echo "Usage: fixup-vrouter {start|stop}" >&2
exit 3
;;
esac