1# Copyright (C) 2024 The Android Open Source Project 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14 15# Initialize network configuration before init so that routes are configured 16# before services are started 17 18on post-fs 19 exec_start auto-ethernet-setup 20 exec_start auto-ethernet-namespace-setup 21 setprop android.car.auto_eth_namespace_setup_complete 1 22 23# Set up the main ethernet ip address and routing 24# Create network namespace auto_eth 25service auto-ethernet-setup /system_ext/bin/ethernet/ethernet.sh 26 class core 27 user root 28 group shell 29 oneshot 30 31# Set up routing rule for network namespace auto_eth 32service auto-ethernet-namespace-setup /system_ext/bin/ethernet/ethernet_auto_eth.sh 33 enter_namespace net /mnt/run/auto_eth 34 class core 35 user root 36 group shell 37 oneshot