diff --git a/boottoolsfunctions.lib b/boottoolsfunctions.lib index c87d416..754ebad 100755 --- a/boottoolsfunctions.lib +++ b/boottoolsfunctions.lib @@ -107,11 +107,11 @@ case "${1,,}" in xenial-4.8) # ogLive 1.1.0-rc5 basado en Ubuntu 16.04 y Kernel 4.8. OSDISTRIB="ubuntu" OSCODENAME="xenial" - OSRELEASE="4.8.0-30-generic" + OSRELEASE="4.8.0-34-generic" OSARCH="i386" OSHTTP="http://es.archive.ubuntu.com/ubuntu/" ;; - host | *) # ogLive basado en la distribución del servidor. + host) # ogLive basado en la distribución del servidor. OSDISTRIB=$(lsb_release -is) OSCODENAME=$(lsb_release -cs) OSRELEASE=$(uname -a | awk '{print $3}') @@ -119,6 +119,10 @@ case "${1,,}" in OSARCH="i386" export OSHTTP="http://es.archive.ubuntu.com/ubuntu/" ;; + *) # Parámetro desconocido + echo "Parámetro no válido." + exit 1 + ;; esac SVNURL="http://opengnsys.es/svn/branches/version1.1/client" VERSIONSVN=$(LANG=C svn info $SVNURL | awk '/Rev:/ {print "r"$4}') diff --git a/boottoolsgenerator.sh b/boottoolsgenerator.sh index 7a8613a..5248b4b 100755 --- a/boottoolsgenerator.sh +++ b/boottoolsgenerator.sh @@ -15,7 +15,7 @@ #Variables -TYPECLIENT="host" +TYPECLIENT="${1:-host}" WORKDIR=/tmp/opengnsys_installer INSTALL_TARGET=/opt/opengnsys PROGRAMDIR=$(readlink -e $(dirname "$0")) diff --git a/includes/etc/initramfs-tools/scripts/ogfunctions b/includes/etc/initramfs-tools/scripts/ogfunctions index c120632..2d5f0b5 100644 --- a/includes/etc/initramfs-tools/scripts/ogfunctions +++ b/includes/etc/initramfs-tools/scripts/ogfunctions @@ -124,6 +124,8 @@ ogExportVarEnvironment () [ "$ogunit" != "" ] && OGUNIT="/$ogunit" # OPTIONS Para samba y local (a nfs no le afecta) export OPTIONS=" -o user=opengnsys,pass=og" + export OGLIVEDIR="${oglivedir:-ogclient}" && echo "OGLIVEDIR=$OGLIVEDIR" >> $CFGINITRD + unset oglivedir case "$OGPROTOCOL" in nfs|NFS) export SRCOGLIVE="/var/lib/tftpboot" && echo "SRCOGLIVE=$SRCOGLIVE" >> $CFGINITRD @@ -133,8 +135,7 @@ ogExportVarEnvironment () ;; smb|SMB|cifs|CIFS|samba|SAMBA) export SRCOGLIVE="tftpboot" && echo "SRCOGLIVE=$SRCOGLIVE" >> $CFGINITRD - export DEFOGSHARE="ogclient" - export SRCOGSHARE="${oglive:-$DEFOGSHARE}" && echo "SRCOGSHARE=$SRCOGSHARE" >> $CFGINITRD + export SRCOGSHARE="ogclient" && echo "SRCOGSHARE=$SRCOGSHARE" >> $CFGINITRD export SRCOGLOG="oglog" && echo "SRCOGLOG=$SRCOGLOG" >> $CFGINITRD export SRCOGIMAGES="ogimages$OGUNIT" && echo "SRCOGIMAGES=$SRCOGIMAGES" >> $CFGINITRD ;; @@ -508,18 +509,18 @@ ogConnectOgLive () ogMergeLive() { #Si existe en el punto de acceso del del oglive el fichero ogclient.sqfs -if [ -f $DSTOGLIVE/ogclient/ogclient.sqfs ] +if [ -f $DSTOGLIVE/$OGLIVEDIR/ogclient.sqfs ] then cat /proc/mounts > /tmp/mtab.preunion if [ "$og2nd" == "img" ] then #Montamos el ROOTFS tipo img, para desarrolladores #TODO: comprobar que se tiene acceso de escritura - losetup /dev/loop0 $DSTOGLIVE/ogclient/ogclient.img -o 32256 + losetup /dev/loop0 $DSTOGLIVE/$OGLIVEDIR/ogclient.img -o 32256 mount /dev/loop0 $OGLIVEROOTFS else ## Montamos el ROOTFS tipo squashfs - mount $DSTOGLIVE/ogclient/ogclient.sqfs $OGLIVEROOTFS -t squashfs -o loop + mount $DSTOGLIVE/$OGLIVEDIR/ogclient.sqfs $OGLIVEROOTFS -t squashfs -o loop fi # Realizamos la union entre el ogliveram(initrd) y el ogliverootfs(ogclient.sqfs) # Nota: el orden es muy importante para evitar errores de montaje. diff --git a/includes/usr/bin/boot-tools/boottoolsSoftwareCompile.sh b/includes/usr/bin/boot-tools/boottoolsSoftwareCompile.sh index bec4c7c..b74946e 100755 --- a/includes/usr/bin/boot-tools/boottoolsSoftwareCompile.sh +++ b/includes/usr/bin/boot-tools/boottoolsSoftwareCompile.sh @@ -13,16 +13,9 @@ export LANG=C source /opt/opengnsys/lib/engine/bin/ToolsGNU.c &>/dev/null pushd /tmp -echo "ctorrent " -which ctorrent || ctorrent install &>/dev/null - -echo "udp-sender " -which udp-sender || udpcast install &>/dev/null - echo "ms-sys " which ms-sys || ms-sys install &>/dev/null - echo "spartlnx" which spartlnx.run || $(wget http://damien.guibouret.free.fr/savepart.zip &>/dev/null; unzip -o savepart.zip -d /sbin/) diff --git a/includes/usr/bin/boot-tools/listpackages/sw.basic b/includes/usr/bin/boot-tools/listpackages/sw.basic index 9390603..fc869c8 100644 --- a/includes/usr/bin/boot-tools/listpackages/sw.basic +++ b/includes/usr/bin/boot-tools/listpackages/sw.basic @@ -20,3 +20,5 @@ install realpath install rpm install sqlite3 install os-prober +install moreutils +install jq diff --git a/includes/usr/bin/boot-tools/listpackages/sw.networking b/includes/usr/bin/boot-tools/listpackages/sw.networking index 61bf57c..cf4072c 100644 --- a/includes/usr/bin/boot-tools/listpackages/sw.networking +++ b/includes/usr/bin/boot-tools/listpackages/sw.networking @@ -10,5 +10,7 @@ install ssmping install tcpdump install nmap install arping -install iptraf +#install iptraf install ntpdate +install ctorrent +install udpcast