More fun with dupes

This commit is contained in:
Grant Limberg 2020-03-03 23:52:53 -08:00
parent e702942041
commit f6026f94a5
No known key found for this signature in database
GPG Key ID: 2BA62CCABBB4095A
2 changed files with 10 additions and 5 deletions

View File

@ -530,7 +530,12 @@ void PostgreSQL::initializeMembers(PGconn *conn)
int n = PQntuples(r2); int n = PQntuples(r2);
for (int j = 0; j < n; ++j) { for (int j = 0; j < n; ++j) {
config["ipAssignments"].push_back(PQgetvalue(r2, j, 0)); std::string ipaddr = PQgetvalue(r2, j, 0);
std::size_t pos = ipaddr.find('/');
if (pos != std::string::npos) {
ipaddr = ipaddr.substr(0, pos);
}
config["ipAssignments"].push_back(ipaddr);
} }
_memberChanged(empty, config, false); _memberChanged(empty, config, false);

View File

@ -10,10 +10,10 @@ RUN yum -y install epel-release && yum -y update && yum clean all
RUN yum groupinstall -y "Development Tools" RUN yum groupinstall -y "Development Tools"
RUN yum install -y bash postgresql10 postgresql10-devel libpqxx-devel glibc-static libstdc++-static clang jemalloc jemalloc-devel RUN yum install -y bash postgresql10 postgresql10-devel libpqxx-devel glibc-static libstdc++-static clang jemalloc jemalloc-devel
RUN git clone http://git.int.zerotier.com/zerotier/ZeroTierOne.git # RUN git clone http://git.int.zerotier.com/zerotier/ZeroTierOne.git
RUN if [ "$git_branch" != "master" ]; then cd ZeroTierOne && git checkout -b $git_branch origin/$git_branch; fi # RUN if [ "$git_branch" != "master" ]; then cd ZeroTierOne && git checkout -b $git_branch origin/$git_branch; fi
RUN ldconfig ADD . /ZeroTierOne
RUN cd ZeroTierOne && make central-controller RUN cd ZeroTierOne && make clean && make central-controller
FROM centos:7 FROM centos:7
RUN yum install -y https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7-x86_64/pgdg-centos10-10-2.noarch.rpm && yum -y install epel-release && yum -y update && yum clean all RUN yum install -y https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7-x86_64/pgdg-centos10-10-2.noarch.rpm && yum -y install epel-release && yum -y update && yum clean all