(List (Com {[LIT_CHARS set]} {[LIT_CHARS -e]} ) (FunctionDef usage [] (List (Com {[LIT_CHARS echo]} {[DQ [VarSub 0][LIT_CHARS " [-f FLANNEL-ENV-FILE] [-d DOCKER-ENV-FILE] [-i] [-c] [-m] [-k COMBINED-KEY]\n"][LIT_CHARS "\n"][LIT_CHARS "Generate Docker daemon options based on flannel env file\n"][LIT_CHARS "OPTIONS:\n"][LIT_CHARS " -f Path to flannel env file. Defaults to /run/flannel/subnet.env\n"][LIT_CHARS " -d Path to Docker env file to write to. Defaults to /run/docker_opts.env\n"][LIT_CHARS " -i Output each Docker option as individual var. e.g. DOCKER_OPT_MTU=1500\n"][LIT_CHARS " -c Output combined Docker options into DOCKER_OPTS var\n"][LIT_CHARS " -k Set the combined options key to this value (default DOCKER_OPTS=)\n"][LIT_CHARS " -m Do not output --ip-masq (useful for older Docker version)\n"]]} < (FilenameRedirectNode filename={[LIT_CHARS /dev/stderr]} "> 1), > ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 1]} ) ) ) (= scope= flags=0 words=[] bindings=[('flannel_env', {[DQ [LIT_CHARS /run/flannel/subnet.env]]})]) (= scope= flags=0 words=[] bindings=[('docker_env', {[DQ [LIT_CHARS /run/docker_opts.env]]})]) (= scope= flags=0 words=[] bindings=[('combined_opts_key', {[DQ [LIT_CHARS DOCKER_OPTS]]})]) (= scope= flags=0 words=[] bindings=[('indiv_opts', {[LIT_CHARS false]})]) (= scope= flags=0 words=[] bindings=[('combined_opts', {[LIT_CHARS false]})]) (= scope= flags=0 words=[] bindings=[('ipmasq', {[LIT_CHARS true]})]) (While (Com {[LIT_CHARS getopts]} {[DQ [LIT_CHARS "f:d:ick:"]]} {[LIT_CHARS opt]} ) (Case to_match={[VarSub opt]}, pat_word_list=[[{[LIT_CHARS f]}], [{[LIT_CHARS d]}], [{[LIT_CHARS i]}], [{[LIT_CHARS c]}], [{[LIT_CHARS m]}], [{[LIT_CHARS k]}], [{[\ LIT_ESCAPED_CHAR "\\?"]}]] (= scope= flags=0 words=[] bindings=[('flannel_env', {[VarSub OPTARG]})]) (= scope= flags=0 words=[] bindings=[('docker_env', {[VarSub OPTARG]})]) (= scope= flags=0 words=[] bindings=[('indiv_opts', {[LIT_CHARS true]})]) (= scope= flags=0 words=[] bindings=[('combined_opts', {[LIT_CHARS true]})]) (= scope= flags=0 words=[] bindings=[('ipmasq', {[LIT_CHARS false]})]) (= scope= flags=0 words=[] bindings=[('combined_opts_key', {[VarSub OPTARG]})]) (Com {[LIT_CHARS usage]} ) ) ) (If (AndOr OP_AND_IF (DBracket {B2 BINARY_STRING_EQUAL {[VarSub indiv_opts]} {[LIT_CHARS false]}}) (DBracket {B2 BINARY_STRING_EQUAL {[VarSub combined_opts]} {[LIT_CHARS false]}}) ) (List (= scope= flags=0 words=[] bindings=[('indiv_opts', {[LIT_CHARS true]})]) (= scope= flags=0 words=[] bindings=[('combined_opts', {[LIT_CHARS true]})]) ) ) (If (DBracket {B1 UNARY_FILE_f {[DQ [VarSub flannel_env]]}}) (Com {[LIT_CHARS source]} {[VarSub flannel_env]} ) ) (If (DBracket {B1 UNARY_STRING_n {[DQ [VarSub FLANNEL_SUBNET]]}}) (= scope= flags=0 words=[] bindings=[('DOCKER_OPT_BIP', {[DQ [LIT_CHARS "--bip="][VarSub FLANNEL_SUBNET]]})]) ) (If (DBracket {B1 UNARY_STRING_n {[DQ [VarSub FLANNEL_MTU]]}}) (= scope= flags=0 words=[] bindings=[('DOCKER_OPT_MTU', {[DQ [LIT_CHARS "--mtu="][VarSub FLANNEL_MTU]]})]) ) (If (AndOr OP_AND_IF (DBracket {B2 BINARY_STRING_EQUAL {[DQ [VarSub FLANNEL_IPMASQ]]} {[LIT_CHARS true]}}) (DBracket {B2 BINARY_STRING_EQUAL {[VarSub ipmasq]} {[LIT_CHARS true]}}) ) (= scope= flags=0 words=[] bindings=[('DOCKER_OPT_IPMASQ', {[DQ [LIT_CHARS "--ip-masq=false"]]})]) ) (Com {[LIT_CHARS eval]} {[LIT_VAR_LIKE "docker_opts="] [DQ [\ LIT_ESCAPED_CHAR "\\$"][VarSub combined_opts_key]] =} ) (= scope= flags=0 words=[] bindings=[('docker_opts+', {[DQ [LIT_CHARS " "]]})]) (Com {[LIT_CHARS echo]} {[LIT_CHARS -n]} {[DQ ]} < (FilenameRedirectNode filename={[VarSub docker_env]} "> 1), > ) (For opt [{[ComSub (Com {[LIT_CHARS compgen]} {[LIT_CHARS -v]} {[LIT_CHARS DOCKER_OPT_]})]}]) (List (Com {[LIT_CHARS eval]} {[LIT_VAR_LIKE "val="] [\ LIT_ESCAPED_CHAR "\\$"] [VarSub opt] =} ) (If (DBracket {B2 BINARY_STRING_EQUAL {[DQ [VarSub indiv_opts]]} {[LIT_CHARS true]}}) (Com {[LIT_CHARS echo]} {[DQ [VarSub opt][LIT_CHARS "="][\ LIT_ESCAPED_CHAR "\\\""][VarSub val][\ LIT_ESCAPED_CHAR "\\\""]]} < (FilenameRedirectNode filename={[VarSub docker_env]} >"> 1), > ) ) (= scope= flags=0 words=[] bindings=[('docker_opts+', {[DQ [VarSub val][LIT_CHARS " "]]})]) ) ) (If (DBracket {B2 BINARY_STRING_EQUAL {[DQ [VarSub combined_opts]]} {[LIT_CHARS true]}}) (Com {[LIT_CHARS echo]} {[DQ [VarSub combined_opts_key][LIT_CHARS "="][\ LIT_ESCAPED_CHAR "\\\""][VarSub docker_opts][\ LIT_ESCAPED_CHAR "\\\""]]} < (FilenameRedirectNode filename={[VarSub docker_env]} >"> 1), > ) ) )