From d7e33cb56818afdf9d216f18183550f620d4d3d0 Mon Sep 17 00:00:00 2001 From: OpenGnSys Support Team Date: Thu, 31 Jan 2019 09:15:07 +0100 Subject: #893 Adding code to rename client pc in configureOs --- client/shared/scripts/configureOs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'client') diff --git a/client/shared/scripts/configureOs b/client/shared/scripts/configureOs index 4b7ec6f7..5e02ec4c 100755 --- a/client/shared/scripts/configureOs +++ b/client/shared/scripts/configureOs @@ -88,6 +88,10 @@ case "$OSTYPE" in [ -n "$(find $MNTDIR/usr/sbin $MNTDIR/sbin $MNTDIR/usr/local/sbin -name ogAdmLnxClient -print)" ] && ogUninstallLinuxClient $1 $2 # Configurar nuevo agente OGAgent. ogConfigureOgagent $1 $2 + ## Modificar el nombre del equipo + echo "Asignar nombre Linux \"$HOST\"." + ETC=$(ogGetPath $1 $2 /etc) + [ -d "$ETC" ] && echo "$HOST" >$ETC/hostname 2>/dev/null ;; MacOS) # Postconfiguración de Mac OS X. # Fichero indicador de activación de postconfiguración. -- cgit v1.2.3-18-g5258 From 62eba32016cce7042539674d7e56f40bc5e102ff Mon Sep 17 00:00:00 2001 From: Irina Gómez Date: Mon, 4 Feb 2019 11:20:28 +0100 Subject: #895 Fixs the partitioning wizard: can change partition table from MSDOS to GPT whithout reboot. Fixs fake error in ogCreateGptPartitions when there isn't cache. --- client/engine/Disk.lib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'client') diff --git a/client/engine/Disk.lib b/client/engine/Disk.lib index 06744bd9..ac7aab5f 100755 --- a/client/engine/Disk.lib +++ b/client/engine/Disk.lib @@ -258,7 +258,7 @@ ogCreatePartitionTable $ND # Definir particiones y notificar al kernel. # Borramos primero las particiones y luego creamos las nuevas sgdisk $DELOPTIONS $OPTIONS $DISK 2>/dev/null && partprobe $DISK -[ -n "$CACHESIZE" ] && ogMountCache 2>/dev/null +[ -n "$CACHESIZE" ] && ogMountCache 2>/dev/null || return 0 } -- cgit v1.2.3-18-g5258 From ce1aa0b33271d3cad06ee52004f011d00195aebc Mon Sep 17 00:00:00 2001 From: Irina Gómez Date: Fri, 22 Mar 2019 13:44:53 +0100 Subject: #905 Fix deployImage: When protocol is '*-CACHE' remove string after the hyphen --- client/shared/scripts/deployImage | 2 ++ 1 file changed, 2 insertions(+) (limited to 'client') diff --git a/client/shared/scripts/deployImage b/client/shared/scripts/deployImage index 824da2af..b6696443 100755 --- a/client/shared/scripts/deployImage +++ b/client/shared/scripts/deployImage @@ -119,6 +119,8 @@ case "$MODE" in # Si protocolo es torrent|torrent-cache o multicast|multicast-cache TORRENT|TORRENT-CACHE|MULTICAST|MULTICAST-CACHE|UNICAST|UNICAST-CACHE) + # Eliminamos CACHE o DIRECT + PROTO=${PROTO%%-*} ogEcho log session "[2] updateCache "$REPO" \"/$IMGNAME.img\" $PROTO $PROTOOPT" TIME2=$SECONDS updateCache "$REPO" "/$IMGNAME.img" "$PROTO" "$PROTOOPT" -- cgit v1.2.3-18-g5258 From 30fa5b494415c05d135f7b18e6eb44a48dbe2feb Mon Sep 17 00:00:00 2001 From: Juan Manuel Bardallo Date: Tue, 26 Mar 2019 12:04:01 +0100 Subject: #906 Operations with partitions and images support NVMe --- client/engine/Cache.lib | 10 +++++++++- client/engine/Disk.lib | 22 +++++++++++++++++----- 2 files changed, 26 insertions(+), 6 deletions(-) (limited to 'client') diff --git a/client/engine/Cache.lib b/client/engine/Cache.lib index 0e7f51ef..8565fe1c 100755 --- a/client/engine/Cache.lib +++ b/client/engine/Cache.lib @@ -81,6 +81,14 @@ esac TMPFILE=/tmp/sfdisk$$ DISK=$(ogDiskToDev $NDSK) || return $? + + # PATCH Para discos nvme la particion debe ser p1, p2, etc...en lugar de 1,2, sino falla sfdisk +NVME_PREFIX="" +if [[ $DISK == *"nvme"* ]]; then + NVME_PREFIX="p" +fi + + END=$[$(ogGetLastSector $NDSK 2>/dev/null)] # Sector final del disco. SIZE=$[$SIZECACHE*2] # Tamaño en sectores de 512 B. # Inicio partición cache según el disco tenga sectores de 4k o menores @@ -127,7 +135,7 @@ case "$(ogGetPartitionTableType $NDSK)" in # Salvamos la configuración de las particiones e incluimos la cache. trap "rm -f $TMPFILE" 1 2 3 9 15 sfdisk --dump $DISK | grep -v $DISK$PART > $TMPFILE - echo "$DISK$PART : start= $START, size= $SIZE, Id=$ID" >> $TMPFILE + echo "$DISK$NVME_PREFIX$PART : start= $START, size= $SIZE, Id=$ID" >> $TMPFILE # Ordenamos las líneas de los dispositivos UNIT=$(grep unit $TMPFILE) grep ^/dev $TMPFILE|sort -o $TMPFILE diff --git a/client/engine/Disk.lib b/client/engine/Disk.lib index ac7aab5f..3ea01bbd 100755 --- a/client/engine/Disk.lib +++ b/client/engine/Disk.lib @@ -94,12 +94,18 @@ trap "rm -f $tmpsfdisk" 1 2 3 9 15 echo "unit: sectors" >$tmpsfdisk echo >>$tmpsfdisk +NVME_PREFIX="" +if [[ $DISK == *"nvme"* ]]; then + NVME_PREFIX="p" +fi + + # Generar fichero de entrada para "sfdisk" con las particiones. shift while [ $# -gt 0 ]; do # Conservar los datos de la partición de caché. if [ "$ND $PART" == "$CACHEPART" -a -n "$CACHESIZE" ]; then - echo "$DISK$PART : start=$[SECTORS+1], size=$CACHESIZE, Id=ca" >>$tmpsfdisk + echo "$DISK$NVME_PREFIX$PART : start=$[SECTORS+1], size=$CACHESIZE, Id=ca" >>$tmpsfdisk PART=$[PART+1] fi # Leer formato de cada parámetro - Tipo:Tamaño @@ -125,7 +131,7 @@ while [ $# -gt 0 ]; do SECTORS=$[EXTSTART+EXTSIZE] fi # Generar datos para la partición. - echo "$DISK$PART : start=$START, size=$SIZE, Id=$ID" >>$tmpsfdisk + echo "$DISK$NVME_PREFIX$PART : start=$START, size=$SIZE, Id=$ID" >>$tmpsfdisk # Error si se supera el nº total de sectores. START=$[START+SIZE] if [ "$IOSIZE" == "4096" -a $PART -gt 4 ]; then @@ -138,9 +144,9 @@ done # Si no se indican las 4 particiones primarias, definirlas como vacías, conservando la partición de caché. while [ $PART -le 4 ]; do if [ "$ND $PART" == "$CACHEPART" -a -n "$CACHESIZE" ]; then - echo "$DISK$PART : start=$[SECTORS+1], size=$CACHESIZE, Id=ca" >>$tmpsfdisk + echo "$DISK$NVME_PREFIX$PART : start=$[SECTORS+1], size=$CACHESIZE, Id=ca" >>$tmpsfdisk else - echo "$DISK$PART : start=0, size=0, Id=0" >>$tmpsfdisk + echo "$DISK$NVME_PREFIX$PART : start=0, size=0, Id=0" >>$tmpsfdisk fi PART=$[PART+1] done @@ -431,7 +437,13 @@ fi # Si no se encuentra, procesa todos los discos para devolver su nº de orden y de partición. n=1 for d in $(ogDiskToDev); do - [ -n "$(echo $DEV | grep $d)" ] && echo "$n ${DEV#$d}" && return +NVME_PREFIX="" +if [[ $d == *"nvme"* ]]; then + NVME_PREFIX="p" +fi + + + [ -n "$(echo $DEV | grep $d)" ] && echo "$n ${DEV#$d$NVME_PREFIX}" && return n=$[n+1] done ogRaiseError $OG_ERR_NOTFOUND "$1" -- cgit v1.2.3-18-g5258 From d95983402ddcb8b0a7db6542ba51a03bd8604db8 Mon Sep 17 00:00:00 2001 From: "Ramón M. Gómez" Date: Wed, 27 Mar 2019 08:04:24 +0100 Subject: #906: Declaring new variables as local. --- client/engine/Cache.lib | 5 +++-- client/engine/Disk.lib | 7 ++++--- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'client') diff --git a/client/engine/Cache.lib b/client/engine/Cache.lib index 8565fe1c..bda02951 100755 --- a/client/engine/Cache.lib +++ b/client/engine/Cache.lib @@ -4,7 +4,7 @@ #@brief Librería o clase Cache #@class Cache #@brief Funciones para gestión de la caché local de disco. -#@version 1.1.0 +#@version 1.1.1 #@warning License: GNU GPLv3+ #*/ @@ -44,7 +44,8 @@ function ogCreateCache () { # Variables locales. -local FINDCACHE IOSIZE NDSK SIZECACHE PART DISK START END ENDPREVPART SIZE MINSIZE MAXSIZE PTTYPE ID TMPFILE +local FINDCACHE IOSIZE NDSK SIZECACHE PART DISK START END ENDPREVPART SIZE MINSIZE MAXSIZE +local PTTYPE ID TMPFILE NVME_PREFIX # Si se solicita, mostrar ayuda. if [ "$*" == "help" ]; then ogHelp "$FUNCNAME" "$FUNCNAME [int_ndisk [int_npart]] int_partsize" \ diff --git a/client/engine/Disk.lib b/client/engine/Disk.lib index 3ea01bbd..732fb2e5 100755 --- a/client/engine/Disk.lib +++ b/client/engine/Disk.lib @@ -4,7 +4,7 @@ #@brief Librería o clase Disk #@class Disk #@brief Funciones para gestión de discos y particiones. -#@version 1.1.0 +#@version 1.1.1 #@warning License: GNU GPLv3+ #*/ @@ -47,7 +47,8 @@ timeout -k 5s -s KILL 3s $(which parted) "$@" function ogCreatePartitions () { # Variables locales. -local ND DISK PTTYPE PART SECTORS START SIZE TYPE CACHEPART IODISCO IOSIZE CACHESIZE EXTSTART EXTSIZE tmpsfdisk +local ND DISK PTTYPE PART SECTORS START SIZE TYPE CACHEPART IODISCO IOSIZE CACHESIZE +local EXTSTART EXTSIZE NVME_PREFIX tmpsfdisk # Si se solicita, mostrar ayuda. if [ "$*" == "help" ]; then ogHelp "$FUNCNAME" "$FUNCNAME int_ndisk str_parttype:int_partsize ..." \ @@ -402,7 +403,7 @@ esac function ogDevToDisk () { # Variables locales. -local CACHEFILE DEV PART d n +local CACHEFILE DEV PART NVME_PREFIX d n # Si se solicita, mostrar ayuda. if [ "$*" == "help" ]; then ogHelp "$FUNCNAME" "$FUNCNAME path_device | LABEL=str_label | UUID=str_uuid" \ -- cgit v1.2.3-18-g5258 From 58a6159ff02b4216d1d0e65f5f3ceff27b6f2397 Mon Sep 17 00:00:00 2001 From: "Ramón M. Gómez" Date: Thu, 11 Apr 2019 13:58:48 +0200 Subject: #845: Preparing creation of ogLive based on Kernel 4.18. --- client/boot-tools/boottoolsfunctions.lib | 9 ++++++++- .../boot-tools/includes/etc/initramfs-tools/scripts/VERSION.txt | 2 +- .../boot-tools/includes/usr/bin/boot-tools/listpackages/sw.basic | 3 ++- 3 files changed, 11 insertions(+), 3 deletions(-) (limited to 'client') diff --git a/client/boot-tools/boottoolsfunctions.lib b/client/boot-tools/boottoolsfunctions.lib index f364f174..7f7bbb38 100755 --- a/client/boot-tools/boottoolsfunctions.lib +++ b/client/boot-tools/boottoolsfunctions.lib @@ -116,13 +116,20 @@ case "${1,,}" in OSARCH="amd64" OSHTTP="http://es.archive.ubuntu.com/ubuntu/" ;; - bionic) # ogLive 1.1.1-rc1 basado en Ubuntu 18.04 y Kernel 4.15. + bionic|bionic-4.15) # ogLive 1.1.1-rc1 basado en Ubuntu 18.04 y Kernel 4.15. OSDISTRIB="ubuntu" OSCODENAME="bionic" OSRELEASE="4.15.0-32-generic" OSARCH="amd64" OSHTTP="http://es.archive.ubuntu.com/ubuntu/" ;; + bionic-4.18) # ogLive 1.1.1-rc3 basado en Ubuntu 18.04 y Kernel 4.18. + OSDISTRIB="ubuntu" + OSCODENAME="bionic" + OSRELEASE="4.18.0-17-generic" + OSARCH="amd64" + OSHTTP="http://es.archive.ubuntu.com/ubuntu/" + ;; host) # ogLive basado en la distribución del servidor. OSDISTRIB=$(lsb_release -is) OSCODENAME=$(lsb_release -cs) diff --git a/client/boot-tools/includes/etc/initramfs-tools/scripts/VERSION.txt b/client/boot-tools/includes/etc/initramfs-tools/scripts/VERSION.txt index 45805bd6..bc92b96f 100644 --- a/client/boot-tools/includes/etc/initramfs-tools/scripts/VERSION.txt +++ b/client/boot-tools/includes/etc/initramfs-tools/scripts/VERSION.txt @@ -1 +1 @@ -OpenGnsys Client 1.1.1-rc2 +OpenGnsys Client 1.1.1-rc3 diff --git a/client/boot-tools/includes/usr/bin/boot-tools/listpackages/sw.basic b/client/boot-tools/includes/usr/bin/boot-tools/listpackages/sw.basic index afd8ff4c..31f2b559 100644 --- a/client/boot-tools/includes/usr/bin/boot-tools/listpackages/sw.basic +++ b/client/boot-tools/includes/usr/bin/boot-tools/listpackages/sw.basic @@ -9,7 +9,8 @@ install console-data install locales install lshw install gawk -install subversion +#install subversion # ogLive anterior a Ubuntu 18.04 +install git # ogLive a partir de Ubuntu 18.04 install python-openssl install python #install php5-cli # ogLive anterior a Ubuntu 16.04 -- cgit v1.2.3-18-g5258