#/bin/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. [ ! -f /var/cache/cloud/enabled_svcs ] && touch /var/cache/cloud/enabled_svcs for svc in $(cat /var/cache/cloud/enabled_svcs) do logger -t cloud "Starting $svc" service $svc start done [ ! -f /var/cache/cloud/disabled_svcs ] && touch /var/cache/cloud/disabled_svcs for svc in $(cat /var/cache/cloud/disabled_svcs) do logger -t cloud "Stopping $svc" service $svc stop done CMDLINE=$(cat /var/cache/cloud/cmdline) router=$(echo "$CMDLINE" | grep -o type=router) vpcrouter=$(echo "$CMDLINE" | grep -o type=vpcrouter) if [ "$router" != "" ] || [ "$vpcrouter" != "" ] then echo 1000000 > /proc/sys/net/ipv4/netfilter/ip_conntrack_max echo 1000000 > /proc/sys/net/netfilter/nf_conntrack_max echo 1000000 > /proc/sys/net/nf_conntrack_max fi python /opt/cloud/bin/baremetal-vr.py & date > /var/cache/cloud/boot_up_done logger -t cloud "Boot up process done"