0005-package-base-files-change-sysctl-handling.patch 849 B

12345678910111213141516171819202122
  1. From: Matthias Schiffer <mschiffer@universe-factory.net>
  2. Date: Sat, 11 Jan 2014 13:31:13 +0100
  3. Subject: package/base-files: change sysctl handling
  4. Add hotplug script that applies interface specific sysctls for interfaces that
  5. only appear later - this allows to reliably configure per-interface parameters
  6. in sysctl.conf, e.g. to disable ipv6 autoconfig on a specific iface.
  7. Cherry-picked from Barrier Breaker
  8. diff --git a/package/base-files/files/etc/hotplug.d/net/00-sysctl b/package/base-files/files/etc/hotplug.d/net/00-sysctl
  9. new file mode 100644
  10. index 0000000..5d9da8a
  11. --- /dev/null
  12. +++ b/package/base-files/files/etc/hotplug.d/net/00-sysctl
  13. @@ -0,0 +1,6 @@
  14. +#!/bin/sh
  15. +
  16. +if [ -f /etc/sysctl.conf ] && [ "$ACTION" = add ]; then
  17. + sed -ne "/^[[:space:]]*net\..*\.$DEVICENAME\./p" /etc/sysctl.conf | \
  18. + sysctl -e -p - | logger -t sysctl
  19. +fi