Mail archive
alpine-aports

Re: [alpine-aports] [PATCH] testing/csync2: upgrade to 2.0

From: Sören Tempel <soeren_at_soeren-tempel.net>
Date: Mon, 28 Sep 2015 18:58:00 +0200

On 24.09.15, Valery Kartel wrote:
> diff --git a/testing/csync2/csync2.post-install b/testing/csync2/csync2.post-install
> new file mode 100644
> index 0000000..3c2ecc1
> --- /dev/null
> +++ b/testing/csync2/csync2.post-install
> _at_@ -0,0 +1,24 @@
> +#!/bin/sh
> +
> +SSL="/etc/csync2/csync2_ssl_"
> +SERV="/etc/services"
> +INETD="/etc/inetd.conf"
> +
> +if [ ! -f ${SSL}key.pem -o ! -f ${SSL}cert.pem ]; then
> + openssl genrsa -out ${SSL}key.pem 1024 &> /dev/null
> + yes '' | openssl req -new -key ${SSL}key.pem -out ${SSL}cert.csr &> /dev/null
> + openssl x509 -req -days 3600 -in ${SSL}cert.csr -out ${SSL}cert.pem -signkey ${SSL}key.pem &> /dev/null
> + rm ${SSL}cert.csr
> +fi
> +
> +if [ ! -f ${SERV} ]; then
> + touch ${SERV}
> +fi
> +grep -q csync2 ${SERV} || echo -e "csync2\t\t30865/tcp" >> ${SERV}
> +
> +if [ ! -f ${INETD} ]; then
> + touch ${INETD}
> +fi
> +grep -q csync2 ${INETD} || echo "csync2 stream tcp nowait root /usr/sbin/csync2 csync2 -i" >> ${INETD}

I don't think that it is a good idea to mess to much with the users
configuration. Especially changing configuration files like
/etc/inetd.conf is a really bad idea imho.

Besides I would refrain from automatically generating SSH keys and
certs, other than that it looks okay.

Sören.


---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Mon Sep 28 2015 - 18:58:00 GMT