]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
netexternal.cgi: Grab DNS servers in pure perl
authorStefan Schantl <stefan.schantl@ipfire.org>
Thu, 20 May 2021 18:31:33 +0000 (20:31 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 17 Jun 2021 20:11:37 +0000 (20:11 +0000)
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
html/cgi-bin/netexternal.cgi

index a31502dd0cd1dc0923f37129471a55edc1aebc90..1e3760c2b339bc93828d51692dcb13edc97b5e52 100644 (file)
@@ -86,8 +86,7 @@ if ( $querry[0] ne~ ""){
 
                        &General::readhash("${General::swroot}/dhcpc/dhcpcd-$netsettings{'RED_DEV'}.info", \%dhcpinfo);
 
-                       my $DNS1=`echo $dhcpinfo{'domain_name_servers'} | cut -f 1 -d " "`;
-                       my $DNS2=`echo $dhcpinfo{'domain_name_servers'} | cut -f 2 -d " "`;
+                       my ($DNS1, $DNS2) = split(/ /, $dhcpinfo{'domain_name_servers'});
 
                        my $lsetme=0;
                        my $leasetime="";