K2LL33D SHELL

 Apache/2.4.7 (Ubuntu)
 Linux sman1baleendah 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64
 uid=33(www-data) gid=33(www-data) groups=33(www-data)
 safemode : OFF
 MySQL: ON | Perl: ON | cURL: OFF | WGet: ON
  >  / lib / resolvconf /
server ip : 172.67.156.115

your ip : 172.69.130.111

H O M E


Filename/lib/resolvconf/list-records
Size1.4 kb
Permissionrwxr-xr-x
Ownerroot : root
Create time27-Apr-2025 09:50
Last modified14-Dec-2012 02:27
Last accessed05-Jul-2025 11:25
Actionsedit | rename | delete | download (gzip)
Viewtext | code | image
#!/bin/bash
# Need bash because we use nullglob, extglob
#
# list-records
#
# Print, one per line, names of non-empty files in the current directory
# that match the shell glob patterns in /etc/resolvconf/interface-order

set -e

# Stores arguments (minus duplicates) in RSLT, separated by newlines
# Doesn't work properly if an argument itself contain whitespace
uniquify()
{
RSLT=""
while [ "$1" ] ; do
for E in $RSLT ; do
[ "$1" = "$E" ] && { shift ; continue 2 ; }
done
RSLT="${RSLT:+$RSLT
}$1"
shift
done
}

### Compile ordered list of resolv.conf-type files ###
PATTERNS="lo.inet* lo.dnsmasq lo.pdnsd lo.!(pdns|pdns-recursor) lo tun* tap* hso* em+([0-9])?(_+([0-9]))* p+([0-9])p+([0-9])?(_+([0-9]))* eth* ath* wlan* ppp* *"
if [ -r /etc/resolvconf/interface-order ] ; then
PATTERNS="$(sed -e '
s/^[[:space:]]\+//
s/[[:space:]].*//
s/#.*//
/\//d
/^~/d
/^\./d
/^$/d
' /etc/resolvconf/interface-order)"
fi

shopt -s nullglob extglob
# The nullglob option isn't essential since the test -s below will eliminate
# any unexpanded patterns. The extglob option makes the glob language of
# interface-order patterns as powerful as regexps.

# Pathname expansion occurs on the following line resulting, in general,
# in multiple instances of filenames; duplicates must be removed.
uniquify $PATTERNS
for FLNM in $RSLT ; do
# Only list records of non-zero size
[ -s "$FLNM" ] && echo "$FLNM"
done
exit 0