Server IP : 85.214.239.14 / Your IP : 3.145.41.108 Web Server : Apache/2.4.62 (Debian) System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.18 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /proc/2/cwd/usr/share/augeas/lenses/dist/ |
Upload File : |
(* Generic lens for shell-script config files like the ones found *) (* in /etc/sysconfig, where a string needs to be split into *) (* single words. *) module Shellvars_list = autoload xfm let eol = Util.eol let key_re = /[A-Za-z0-9_]+/ let eq = Util.del_str "=" let comment = Util.comment let comment_or_eol = Util.comment_or_eol let empty = Util.empty let indent = Util.indent let sqword = /[^ '\t\n]+/ let dqword = /([^ "\\\t\n]|\\\\.)+/ let uqword = /([^ `"'\\\t\n]|\\\\.)+/ let bqword = /`[^`\n]*`/ let space_or_nl = /[ \t\n]+/ let space_or_cl = space_or_nl | Rx.cl (* lists values of the form ... val1 val2 val3 ... *) let list (word:regexp) (sep:regexp) = let list_value = store word in indent . [ label "value" . list_value ] . [ del sep " " . label "value" . list_value ]* . indent (* handle single quoted lists *) let squote_arr = [ label "quote" . store /'/ ] . (list sqword space_or_nl)? . del /'/ "'" (* similarly handle double quoted lists *) let dquote_arr = [ label "quote" . store /"/ ] . (list dqword space_or_cl)? . del /"/ "\"" (* handle unquoted single value *) let unquot_val = [ label "quote" . store "" ] . [ label "value" . store (uqword+ | bqword)]? (* lens for key value pairs *) let kv = [ key key_re . eq . ( (squote_arr | dquote_arr) . comment_or_eol | unquot_val . eol ) ] let lns = ( comment | empty | kv )* let filter = incl "/etc/sysconfig/bootloader" . incl "/etc/sysconfig/kernel" let xfm = transform lns filter (* Local Variables: *) (* mode: caml *) (* End: *)