summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xinstaller/opengnsys_installer.sh6
-rwxr-xr-xrepoman/bin/torrent-creator21
-rwxr-xr-x[-rw-r--r--]repoman/bin/torrent-tracker0
3 files changed, 14 insertions, 13 deletions
diff --git a/installer/opengnsys_installer.sh b/installer/opengnsys_installer.sh
index 6ab371d0..94ded64d 100755
--- a/installer/opengnsys_installer.sh
+++ b/installer/opengnsys_installer.sh
@@ -685,9 +685,9 @@ function smbConfigure()
# Copiar plantailla de recursos para OpenGnSys
sed -e "s/OPENGNSYSDIR/$INSTALL_TARGET/g" \
- $WORKDIR/opengnsys/server/etc/smb-og.conf.tmpl > /etc/smb/smb-og.conf
+ $WORKDIR/opengnsys/server/etc/smb-og.conf.tmpl > /etc/samba/smb-og.conf
# Configurar y recargar Samba"
- perl -pi -e "s/WORKGROUP/OPENGNSYS/; s/server string \=.*/server string \= OpenGnSys Samba Server/; s/^\; *include \=.*$/ include \= \/etc\/smb\/smb-og.conf/" /etc/samba/smb.conf
+ perl -pi -e "s/WORKGROUP/OPENGNSYS/; s/server string \=.*/server string \= OpenGnSys Samba Server/; s/^\; *include \=.*$/ include \= \/etc\/samba\/smb-og.conf/" /etc/samba/smb.conf
/etc/init.d/smbd restart
if [ $? -ne 0 ]; then
errorAndLog "${FUNCNAME}(): error while configure Samba"
@@ -747,7 +747,7 @@ function installWebFiles()
fi
find $INSTALL_TARGET/www -name .svn -type d -exec rm -fr {} \; 2>/dev/null
# Descomprimir XAJAX.
- unzip $WORKDIR/opengnsys/admin/WebConsole/xajax_0.5_standard.zip -d $INSTALL_TARGET/www/xajax
+ unzip $WORKDIR/opengnsys/admin/xajax_0.5_standard.zip -d $INSTALL_TARGET/www/xajax
# Cambiar permisos para ficheros especiales.
chown -R $APACHE_RUN_USER:$APACHE_RUN_GROUP $INSTALL_TARGET/www/images/iconos
echoAndLog "${FUNCNAME}(): Web files installed successfully."
diff --git a/repoman/bin/torrent-creator b/repoman/bin/torrent-creator
index 5d43c753..21d58581 100755
--- a/repoman/bin/torrent-creator
+++ b/repoman/bin/torrent-creator
@@ -3,6 +3,7 @@
#Version 0.3 Ejecución desde cron cada minuto,
## echo "* * * * * root /opt/opengnsys/bin/torrent-creator" > /etc/cron.d/torrentcreator
+## ver moficifcacione en linea 41 - 46
# Comprobar si el proceso ya está en ejecución.
PROG=$(basename $0)
@@ -26,27 +27,27 @@ pushd $OGIMG >/dev/null
trap 'echo "`date` : Proceso interrumpido" >> $LOGFILE; exit ' 1 2 3 6 9 15
for IMG in *.{img,pgz}; do
# Saltar al siguiente si la imagen está bloqueada o si no existe el fichero.
- if [ -f "$IMG.lock" -o ! -f "$IMG" ]; then
+ LOCKFILE="$IMG.lock"
+ if [ -f "$LOCKFILE" -o ! -f "$IMG" ]; then
continue
fi
# Comprobar si ya existe el fichero Torrent para esa imagen.
TORRENT="$IMG.torrent"
- if [ -f "$TORRENT" ]; then
+ SUMFILE="$IMG.sum"
+ if [ -f "$TORRENT" ]; then
FILESIZE="$(ls -l $IMG | awk '{print $5}')"
read -e TORRFILE TORRSIZE <<<"$(ctorrent -x $TORRENT | awk '$1~/<1>/ {print $2,$3}')"
[ "$(basename $IMG)" = "$TORRFILE" -a "[$FILESIZE]" = "$TORRSIZE" ] && continue
fi
- # Crear fichero Torrent.
+ # Bloquear imagen, crear ficheros Torrent y Checksum y desbloquear imagen.
echo "`date` : Inicio creación de fichero $TORRENT" >> $LOGFILE
- rm -f "$TORRENT"
- ##### ADV v. 1.0 23/02/2011
- rm -f $IMG.sum
+ touch "$LOCKFILE"
+ trap "rm -f $LOCKFILE" 1 2 3 6 9
+ rm -f "$TORRENT" "$SUMFILE"
DATASUM=`md5sum "$IMG" | cut -f1 -d" "`
- echo $DATASUM > $IMG.sum
+ echo $DATASUM > "$SUMFILE"
nice -8 ctorrent -t "$IMG" -u $TRACKERURL -s "$TORRENT" -c $DATASUM
- #### ADV v. 1.0 23/02/2011
-
- nice -8 ctorrent -t "$IMG" -u $TRACKERURL -s "$TORRENT"
+ rm -f "$LOCKFILE"
if [ -f "$TORRENT" ]; then
echo "`date` : Fin creación de fichero $TORRENT" >> $LOGFILE
else
diff --git a/repoman/bin/torrent-tracker b/repoman/bin/torrent-tracker
index f355b81a..f355b81a 100644..100755
--- a/repoman/bin/torrent-tracker
+++ b/repoman/bin/torrent-tracker