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`.

(cherry picked from commit 92647cd47a)
This commit is contained in:
Matthias Schiffer 2020-06-13 18:44:46 +02:00
parent e1e7ce3fe6
commit 3ef69c96cf
No known key found for this signature in database
GPG Key ID: 16EF3F64CB201D9C

View File

@ -1,5 +1,5 @@
#!/bin/sh #!/bin/sh
lock /var/lock/gluon_bat0.lock 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 lock -u /var/lock/gluon_bat0.lock