From: Wayne Davison Date: Wed, 1 Jul 2020 16:05:21 +0000 (-0700) Subject: Move name exceptions into the txt file. X-Git-Tag: v3.2.2~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c83a81ca385187151a00813d6ce185bccac81999;p=thirdparty%2Frsync.git Move name exceptions into the txt file. --- diff --git a/daemon-parm.awk b/daemon-parm.awk index 8fc4c237..0166a9e3 100755 --- a/daemon-parm.awk +++ b/daemon-parm.awk @@ -69,16 +69,12 @@ BEGIN { vtype = "int" } - # We have 2 variables that don't match their conf string. Oh well... - if (name == "bind_address") - spname = "address" - else if (name == "rsync_port") - spname = "port" - else { - spname = name - gsub(/_/, " ", spname) - gsub(/-/, "", name) - } + # The name might be var_name|public_name + pubname = name + sub(/\|.*/, "", name) + sub(/.*\|/, "", pubname) + gsub(/_/, " ", pubname) + gsub(/-/, "", name) if (ptype == "ENUM") enum = "enum_" name @@ -87,7 +83,7 @@ BEGIN { defines = defines "\t" vtype " " name ";\n" values = values "\t" $0 ", /* " name " */\n" - params = params " {\"" spname "\", P_" ptype psect name ", " enum ", 0},\n" + params = params " {\"" pubname "\", P_" ptype psect name ", " enum ", 0},\n" accessors = accessors "FN_" sect "_" atype "(lp_" name ", " name ")\n" if (vtype == "char*") { diff --git a/daemon-parm.txt b/daemon-parm.txt index 36ae5115..83ecc980 100644 --- a/daemon-parm.txt +++ b/daemon-parm.txt @@ -1,6 +1,6 @@ Globals: ================================================================ -STRING bind_address NULL +STRING bind_address|address NULL STRING daemon_chroot NULL STRING daemon_gid NULL STRING daemon_uid NULL @@ -9,7 +9,7 @@ STRING pid_file NULL STRING socket_options NULL INTEGER listen_backlog 5 -INTEGER rsync_port 0 +INTEGER rsync_port|port 0 BOOL proxy_protocol False