diff options
-rwxr-xr-x | installer/opengnsys_installer.sh | 21 | ||||
-rw-r--r-- | repoman/etc/rsyncd.conf.tmpl | 2 | ||||
-rwxr-xr-x | server/bin/setsmbpass | 13 |
3 files changed, 30 insertions, 6 deletions
diff --git a/installer/opengnsys_installer.sh b/installer/opengnsys_installer.sh index 367db4af..f8f4f46d 100755 --- a/installer/opengnsys_installer.sh +++ b/installer/opengnsys_installer.sh @@ -110,7 +110,8 @@ case "$OSDISTRIB" in APACHEMAKECERT="make-ssl-cert generate-default-snakeoil --force-overwrite" DHCPSERV=isc-dhcp-server DHCPCFGDIR=/etc/dhcp - INETDSERV=openbsd-inetd + INETDSERV=xinetd + INETDCFGDIR=/etc/xinetd.d MYSQLSERV=mysql RSYNCSERV=rsync RSYNCCFGDIR=/etc @@ -148,6 +149,7 @@ case "$OSDISTRIB" in DHCPSERV=dhcpd DHCPCFGDIR=/etc/dhcp INETDSERV=xinetd + INETDCFGDIR=/etc/xinetd.d IPTABLESSERV=iptables MYSQLSERV=mysqld RSYNCSERV=rsync @@ -929,6 +931,23 @@ function rsyncConfigure() if [ -f /etc/default/rsync ]; then perl -pi -e 's/RSYNC_ENABLE=.*/RSYNC_ENABLE=inetd/' /etc/default/rsync fi + if [ -f $INETDCFGDIR/rsync ]; then + perl -pi -e 's/disable.*/disable = no/' $INETDCFGDIR/rsync + else + cat << EOT > $INETDCFGDIR/rsync +service rsync +{ + disable = no + socket_type = stream + wait = no + user = root + server = $(which rsync) + server_args = --daemon + log_on_failure += USERID + flags = IPv6 +} +EOT + fi service=$RSYNCSERV $ENABLESERVICE service=$INETDSERV $STARTSERVICE fi diff --git a/repoman/etc/rsyncd.conf.tmpl b/repoman/etc/rsyncd.conf.tmpl index 2bb7b97a..ba875862 100644 --- a/repoman/etc/rsyncd.conf.tmpl +++ b/repoman/etc/rsyncd.conf.tmpl @@ -1,4 +1,4 @@ -max connections = 2 +max connections = 0 log file = /var/log/rsync.log timeout = 300 diff --git a/server/bin/setsmbpass b/server/bin/setsmbpass index 2d340c64..cba6f1ea 100755 --- a/server/bin/setsmbpass +++ b/server/bin/setsmbpass @@ -56,12 +56,17 @@ if [ -r $CLIENTINITRD ]; then sed -i "s/OPTIONS=\(.*\)user=\w*\(.*\)pass=\w*\(.*\)/OPTIONS=\1user=$SAMBAUSER\2pass=$SAMBAPASS\3/" scripts/ogfunctions # TEMPORAL: solución ticket 554, actualizar cliente en caché (ogLive r3257). sed -i "s/busybox reboot/reboot/" scripts/ogfunctions - # Ticket 565, preparar acceso Rsync. - echo "$SAMBAUSER:$SAMBAPASS" > etc/rsync.secrets - chown root.root etc/rsync.secrets - chmod 400 etc/rsync.secrets # FIN CÓDIGO TEMPORAL. + # Ticket 565, preparar acceso Rsync cliente. + echo "$SAMBAPASS" > etc/passrsync + chown root.root etc/passrsync + chmod 400 etc/passrsync + # Generar Initrd del cliente. find . | cpio -H newc -oa | gzip -9c > $CLIENTINITRD + # Ticket 565, preparar acceso Rsync servidor. + echo "$SAMBAUSER:$SAMBAPASS" > /etc/rsyncd.secrets + chown root.root /etc/rsyncd.secrets + chmod 600 /etc/rsyncd.secrets else echo "$PROG: Aviso: no se ha modificado la clave del cliente." fi |