| # Copyright 2015 The Chromium OS Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| description "Sets up bridge interface for android containers" |
| author "chromium-os-dev@chromium.org" |
| |
| start on started nat |
| stop on stopped nat |
| |
| pre-start script |
| { |
| echo "Pre-start arc-networkd." |
| |
| # Limited port range; Android owns 47104-61000. |
| sysctl -w net.ipv4.ip_local_port_range="32768 47103" |
| } 2>&1 | logger -t "${UPSTART_JOB}" |
| end script # pre-start |
| |
| exec /usr/bin/arc-networkd |
| |
| post-stop script |
| { |
| set +e |
| echo "Post-stop arc-networkd." |
| # Restore original (default) port range. |
| sysctl -w net.ipv4.ip_local_port_range="32768 61000" |
| } 2>&1 | logger -t "${UPSTART_JOB}" |
| end script # post-stop |