gluon-mesh-batman-adv: do not delete bat0 during hardif teardown

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 16:32:22 +02:00
parent 6cb5a2ac7a
commit 23ec91de70
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