From aaca43844522aa58b3e0eea855c488cc7b47336e Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 7 Sep 2021 16:01:18 +0200 Subject: [dhcpc-busybox] Use gawk --- core/modules/dhcpc-busybox/data/opt/openslx/scripts/udhcpc-openslx | 2 +- core/modules/dhcpc-busybox/module.conf | 3 +++ core/modules/dhcpc-busybox/module.conf.ubuntu | 5 +++++ 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 core/modules/dhcpc-busybox/module.conf.ubuntu diff --git a/core/modules/dhcpc-busybox/data/opt/openslx/scripts/udhcpc-openslx b/core/modules/dhcpc-busybox/data/opt/openslx/scripts/udhcpc-openslx index 3e30da55..b661633c 100755 --- a/core/modules/dhcpc-busybox/data/opt/openslx/scripts/udhcpc-openslx +++ b/core/modules/dhcpc-busybox/data/opt/openslx/scripts/udhcpc-openslx @@ -39,7 +39,7 @@ rebuild_resolv_conf () { # group everything else together into one line. # Skip domain entirely if any search lines are found. cat "/run/network/$primary.resolv" /run/network/!("$primary").resolv \ - | awk '{ + | gawk '{ if ( $1 ~ /^[a-z]+$/ ) { for (i = 2; i <= NF; ++i) { if (done[$1][$i]) diff --git a/core/modules/dhcpc-busybox/module.conf b/core/modules/dhcpc-busybox/module.conf index d8961801..612863b9 100644 --- a/core/modules/dhcpc-busybox/module.conf +++ b/core/modules/dhcpc-busybox/module.conf @@ -2,3 +2,6 @@ REQUIRED_MODULES=" rdns " +REQUIRED_BINARIES=" + gawk +" diff --git a/core/modules/dhcpc-busybox/module.conf.ubuntu b/core/modules/dhcpc-busybox/module.conf.ubuntu new file mode 100644 index 00000000..06767018 --- /dev/null +++ b/core/modules/dhcpc-busybox/module.conf.ubuntu @@ -0,0 +1,5 @@ +#!/bin/bash + +REQUIRED_CONTENT_PACKAGES=" + gawk +" -- cgit v1.2.3-55-g7522