* Script {{{boottoolsgenerator.sh}}} soporta parámetro para generar ogLive basado en distribuciones soportadas. * Soporta variable del kernel {{{oglivedir}}} con subdirectorio de instalación de ogLive. * Dejar de compilar paquetes incluidos en distribuciones Ubuntu. * Procesar ficheros JSON en scripts BASH. git-svn-id: https://opengnsys.es/svn/branches/version1.1@5161 a21b9725-9963-47de-94b9-378ad31fedc9remotes/github/master
parent
06f8baeffc
commit
aad89c0f6e
|
@ -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}')
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
|
||||
#Variables
|
||||
TYPECLIENT="host"
|
||||
TYPECLIENT="${1:-host}"
|
||||
WORKDIR=/tmp/opengnsys_installer
|
||||
INSTALL_TARGET=/opt/opengnsys
|
||||
PROGRAMDIR=$(readlink -e $(dirname "$0"))
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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/)
|
||||
|
||||
|
|
|
@ -20,3 +20,5 @@ install realpath
|
|||
install rpm
|
||||
install sqlite3
|
||||
install os-prober
|
||||
install moreutils
|
||||
install jq
|
||||
|
|
|
@ -10,5 +10,7 @@ install ssmping
|
|||
install tcpdump
|
||||
install nmap
|
||||
install arping
|
||||
install iptraf
|
||||
#install iptraf
|
||||
install ntpdate
|
||||
install ctorrent
|
||||
install udpcast
|
||||
|
|
Loading…
Reference in New Issue