Skip to content

Commit

Permalink
Merge pull request #696 from openziti/fix/fgrep-to-grep-f
Browse files Browse the repository at this point in the history
Remove obsolete fgrep
  • Loading branch information
sabedevops committed Aug 3, 2023
2 parents 172e734 + 9d6a290 commit 7a398ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions programs/ziti-edge-tunnel/netif_driver/linux/tun.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ int tun_commit_routes(netif_handle tun, uv_loop_t *l) {
static void dns_update_resolvectl(const char* tun, unsigned int ifindex, const char* addr) {

run_command(RESOLVECTL " dns %s %s", tun, addr);
int s = run_command_ex(false, RESOLVECTL " domain | fgrep -v '%s' | fgrep -q '~.'",
int s = run_command_ex(false, RESOLVECTL " domain | grep -F -v '%s' | grep -F -q '~.'",
dns_maintainer.tun_name);
// set wildcard domain if any other resolvers set it.
if (s == 0) {
Expand All @@ -226,7 +226,7 @@ static void dns_update_resolvectl(const char* tun, unsigned int ifindex, const c

static void dns_update_systemd_resolve(const char* tun, unsigned int ifindex, const char* addr) {
run_command(SYSTEMD_RESOLVE " -i %s --set-dns=%s", tun, addr);
int s = run_command_ex(false, SYSTEMD_RESOLVE " --status | fgrep 'DNS Domain' | fgrep -q '~.'");
int s = run_command_ex(false, SYSTEMD_RESOLVE " --status | grep -F 'DNS Domain' | grep -F -q '~.'");
// set wildcard domain if any other resolvers set it.
if (s == 0) {
run_command(SYSTEMD_RESOLVE " -i %s --set-domain='~.'", dns_maintainer.tun_name);
Expand Down

0 comments on commit 7a398ee

Please sign in to comment.