Changeset View
Changeset View
Standalone View
Standalone View
named.in
| #!/bin/sh | #!/bin/sh | ||||
| # Copyright (c) 2007-2016 Roy Marples | # Copyright (c) 2007-2023 Roy Marples | ||||
| # All rights reserved | # All rights reserved | ||||
| # named subscriber for resolvconf | # named subscriber for resolvconf | ||||
| # Redistribution and use in source and binary forms, with or without | # Redistribution and use in source and binary forms, with or without | ||||
| # modification, are permitted provided that the following conditions | # modification, are permitted provided that the following conditions | ||||
| # are met: | # are met: | ||||
| # * Redistributions of source code must retain the above copyright | # * Redistributions of source code must retain the above copyright | ||||
| ▲ Show 20 Lines • Show All 63 Lines • ▼ Show 20 Lines | while [ -n "$ns" ]; do | ||||
| newzones="$newzones ${ns%%,*};$NL" | newzones="$newzones ${ns%%,*};$NL" | ||||
| [ "$ns" = "${ns#*,}" ] && break | [ "$ns" = "${ns#*,}" ] && break | ||||
| ns="${ns#*,}" | ns="${ns#*,}" | ||||
| done | done | ||||
| newzones="$newzones };$NL};$NL" | newzones="$newzones };$NL};$NL" | ||||
| done | done | ||||
| # Try to ensure that config dirs exist | # Try to ensure that config dirs exist | ||||
| if type config_mkdirs >/dev/null 2>&1; then | if command -v config_mkdirs >/dev/null 2>&1; then | ||||
| config_mkdirs "$named_options" "$named_zones" | config_mkdirs "$named_options" "$named_zones" | ||||
| else | else | ||||
| @SBINDIR@/resolvconf -D "$named_options" "$named_zones" | @SBINDIR@/resolvconf -D "$named_options" "$named_zones" | ||||
| fi | fi | ||||
| # No point in changing files or reloading bind if the end result has not | # No point in changing files or reloading bind if the end result has not | ||||
| # changed | # changed | ||||
| changed=false | changed=false | ||||
| Show All 28 Lines | |||||