]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
wireguard: Don't try to delete any interfaces that don't exist master
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 1 Jun 2025 15:00:51 +0000 (17:00 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 1 Jun 2025 15:00:51 +0000 (17:00 +0200)
When the WireGuard interfaces are being destroyed, we are using some
globbing to identify the right interfaces. If there are no interfaces
the globbing string does not match anything and is returned itself. To
avoid an error when trying to delete an interface that never existed, we
configure the shell to never expand empty globbings.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/initscripts/system/wireguard

index 7decce2237e6a43ba7ed248ae04d3cca879dcfef..00862743b66b61ab3502759f29f05cd347947abf 100644 (file)
@@ -19,6 +19,8 @@
 #                                                                             #
 ###############################################################################
 
+shopt -s nullglob
+
 . /etc/sysconfig/rc
 . ${rc_functions}
 . /etc/rc.d/init.d/networking/functions.network