gluon-mesh-batman-adv: do not delete bat0 during hardif teardown (#2057)

With very bad timing, it is possible that the teardown script of a
gluon_mesh interface runs when bat0 was just created, but primary0 is not
yet added to it. Although there is no hardif to remove in this case,
bat0 will still be deleted, because there is no hardif in bat0.

Disable the interface removal logic by passing `-M` to `batctl interface`.
This commit is contained in:
Matthias Schiffer 2020-06-13 18:44:46 +02:00 committed by GitHub
parent 6cb5a2ac7a
commit 92647cd47a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,5 @@
#!/bin/sh
lock /var/lock/gluon_bat0.lock
batctl interface del "$IFNAME" 2>/dev/null
batctl interface -M del "$IFNAME" 2>/dev/null
lock -u /var/lock/gluon_bat0.lock