We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1442be6 commit 24eba68Copy full SHA for 24eba68
1 file changed
os-image/android/network.sh
@@ -14,6 +14,13 @@
14
IFACE=eth0
15
NETID=100
16
17
+# Guard against repeated invocations — cocoon-network.rc triggers on every
18
+# netd start/restart. Only run once; subsequent calls are no-ops.
19
+GUARD="/tmp/.cocoon-network-done"
20
+if [ -f "$GUARD" ]; then
21
+ exit 0
22
+fi
23
+
24
cmdline_ip() {
25
for x in $(cat /proc/cmdline); do
26
case "$x" in
@@ -101,6 +108,7 @@ else
101
108
ndc network route add "$NETID" "$IFACE" 0.0.0.0/0 "$GW" 2>/dev/null
102
109
ndc network default set "$NETID" 2>/dev/null
103
110
ndc network permission user set NETWORK "$NETID" 2>/dev/null
111
+ touch "$GUARD"
104
112
fi
105
113
106
114
# Set DNS (no ConnectivityService to configure resolvers).
0 commit comments