Server IP : 127.0.0.2 / Your IP : 18.116.36.23 Web Server : Apache/2.4.18 (Ubuntu) System : User : www-data ( ) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : disk_free_space,disk_total_space,diskfreespace,dl,exec,fpaththru,getmyuid,getmypid,highlight_file,ignore_user_abord,leak,listen,link,opcache_get_configuration,opcache_get_status,passthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,php_uname,phpinfo,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix,_getppid,posix_getpwnam,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_times,posix_ttyname,posix_uname,pclose,popen,proc_open,proc_close,proc_get_status,proc_nice,proc_terminate,shell_exec,source,show_source,system,virtual MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/share/augeas/lenses/dist/ |
Upload File : |
(* Module: Resolv Parses /etc/resolv.conf Author: Raphael Pinson <raphink@gmail.com> About: Reference This lens tries to keep as close as possible to `man resolv.conf` where possible. About: Licence This file is licensed under the LGPL v2+, like the rest of Augeas. About: Lens Usage About: Configuration files This lens applies to /etc/resolv.conf. See <filter>. *) module Resolv = autoload xfm (************************************************************************ * Group: USEFUL PRIMITIVES *************************************************************************) (* View: comment *) let comment = Util.comment_generic /[ \t]*[;#][ \t]*/ "# " (* View: comment_eol *) let comment_eol = Util.comment_generic /[ \t]*[;#][ \t]*/ " # " (* View: empty *) let empty = Util.empty (************************************************************************ * Group: MAIN OPTIONS *************************************************************************) (* View: netmask A network mask for IP addresses *) let netmask = [ label "netmask" . Util.del_str "/" . store Rx.ip ] (* View: ipaddr An IP address or range with an optional mask *) let ipaddr = [label "ipaddr" . store Rx.ip . netmask?] (* View: nameserver A nameserver entry *) let nameserver = Build.key_value_line_comment "nameserver" Sep.space (store Rx.ip) comment_eol (* View: domain *) let domain = Build.key_value_line_comment "domain" Sep.space (store Rx.word) comment_eol (* View: search *) let search = Build.key_value_line_comment "search" Sep.space (Build.opt_list [label "domain" . store Rx.word] Sep.space) comment_eol (* View: sortlist *) let sortlist = Build.key_value_line_comment "sortlist" Sep.space (Build.opt_list ipaddr Sep.space) comment_eol (* View: lookup *) let lookup = let lookup_entry = Build.flag("bind"|"file"|"yp") in Build.key_value_line_comment "lookup" Sep.space (Build.opt_list lookup_entry Sep.space) comment_eol (* View: family *) let family = let family_entry = Build.flag("inet4"|"inet6") in Build.key_value_line_comment "family" Sep.space (Build.opt_list family_entry Sep.space) comment_eol (************************************************************************ * Group: SPECIAL OPTIONS *************************************************************************) (* View: ip6_dotint ip6-dotint option, which supports negation *) let ip6_dotint = let negate = [ del "no-" "no-" . label "negate" ] in [ negate? . key "ip6-dotint" ] (* View: options Options values *) let options = let options_entry = Build.key_value ("ndots"|"timeout"|"attempts") (Util.del_str ":") (store Rx.integer) | Build.flag ("debug"|"rotate"|"no-check-names" |"inet6"|"ip6-bytestring"|"edns0" |"single-request-reopen") | ip6_dotint in Build.key_value_line_comment "options" Sep.space (Build.opt_list options_entry Sep.space) comment_eol (* View: entry *) let entry = nameserver | domain | search | sortlist | options | lookup | family (* View: lns *) let lns = ( empty | comment | entry )* (* Variable: filter *) let filter = (incl "/etc/resolv.conf") let xfm = transform lns filter