]> glassweightruler.freedombox.rocks Git - waydroid.git/commitdiff
net: Don't fail start when already running
authorJami Kettunen <jami.kettunen@protonmail.com>
Mon, 16 Jan 2023 13:08:45 +0000 (15:08 +0200)
committerAlessandro Astone <ales.astone@gmail.com>
Mon, 16 Jan 2023 13:15:48 +0000 (14:15 +0100)
After 85843da (container: Make "waydroid-net.sh start" failure fatal)
this could result always failing to start unless you ran
"waydroid-net.sh stop" manually first; perhaps this should always be
stopped upon encountering errors?

data/scripts/waydroid-net.sh

index 19d99d4c21581eb4af11436bdab9efa70b8bee88..1b8a924ab0e8477d3513127643215a24780cf538 100755 (executable)
@@ -128,7 +128,7 @@ add rule ip lxc postrouting ip saddr ${LXC_NETWORK} ip daddr != ${LXC_NETWORK} c
 start() {
     [ "x$USE_LXC_BRIDGE" = "xtrue" ] || { exit 0; }
 
-    [ ! -f "${varrun}/network_up" ] || { echo "waydroid-net is already running"; exit 1; }
+    [ ! -f "${varrun}/network_up" ] || { echo "waydroid-net is already running"; exit 0; }
 
     if [ -d /sys/class/net/${LXC_BRIDGE} ]; then
         stop force || true