refs #273 Removes some innecesaries directories and configure Samba to use ogboot samba template

ogboot_installer
qindel 2024-05-03 09:55:39 +00:00
parent 4fe104eb05
commit 4cf8417973
1 changed files with 11 additions and 29 deletions

View File

@ -632,12 +632,12 @@ function smbConfigure()
backupFile $SAMBACFGDIR/smb.conf backupFile $SAMBACFGDIR/smb.conf
# Copiar plantailla de recursos para OpenGnsys # Copiar plantailla de recursos para OpenGnsys
sed -e "s/OPENGNSYSDIR/${INSTALL_OGBOOT_TARGET//\//\\/}/g" \ sed -e "s/OGBOOTDIR/${INSTALL_OGBOOT_TARGET//\//\\/}/g" \
$WORKDIR/ogboot/server/etc/smb-og.conf.tmpl > $SAMBACFGDIR/smb-og.conf $WORKDIR/ogboot/etc/smb-ogboot.conf.tmpl > $SAMBACFGDIR/smb-ogboot.conf
# Configurar y recargar Samba" # Configurar y recargar Samba"
perl -pi -e "s/WORKGROUP/OPENGNSYS/; s/server string \=.*/server string \= ogBoot Samba Server/" $SAMBACFGDIR/smb.conf perl -pi -e "s/WORKGROUP/OPENGNSYS/; s/server string \=.*/server string \= ogBoot Samba Server/" $SAMBACFGDIR/smb.conf
if ! grep -q "smb-og" $SAMBACFGDIR/smb.conf; then if ! grep -q "smb-ogboot" $SAMBACFGDIR/smb.conf; then
echo "include = $SAMBACFGDIR/smb-og.conf" >> $SAMBACFGDIR/smb.conf echo "include = $SAMBACFGDIR/smb-ogboot.conf" >> $SAMBACFGDIR/smb.conf
fi fi
service=$SAMBASERV service=$SAMBASERV
$ENABLESERVICE; $STARTSERVICE $ENABLESERVICE; $STARTSERVICE
@ -864,29 +864,11 @@ function copyServerFiles ()
local path_ogboot_base="$1" local path_ogboot_base="$1"
# Lista de ficheros y directorios origen y de directorios destino. # Lista de ficheros y directorios origen y de directorios destino.
local SOURCES=( server/tftpboot \ local SOURCES=( tftpboot \
/usr/lib/shim/shimx64.efi.signed \ /bin \
/usr/lib/grub/x86_64-efi-signed/grubnetx64.efi.signed \
server/bin \
repoman/bin \
server/lib \
admin/Sources/Services/ogAdmRepoAux
installer/opengnsys_uninstall.sh \
installer/opengnsys_update.sh \
installer/opengnsys_export.sh \
installer/opengnsys_import.sh \
doc ) doc )
local TARGETS=( tftpboot \ local TARGETS=( tftpboot \
tftpboot \
tftpboot/grubx64.efi \
bin \ bin \
bin \
lib \
sbin \
lib \
lib \
lib \
lib \
doc ) doc )
if [ ${#SOURCES[@]} != ${#TARGETS[@]} ]; then if [ ${#SOURCES[@]} != ${#TARGETS[@]} ]; then
@ -1203,11 +1185,11 @@ fi
rsyncConfigure rsyncConfigure
# Configuración ejemplo DHCP. # Configuración ejemplo DHCP.
dhcpConfigure #dhcpConfigure
if [ $? -ne 0 ]; then #if [ $? -ne 0 ]; then
errorAndLog "Error while copying your dhcp server files!" # errorAndLog "Error while copying your dhcp server files!"
exit 1 # exit 1
fi #fi
# Copiar ficheros de servicios OpenGnsys Server. # Copiar ficheros de servicios OpenGnsys Server.
copyServerFiles ${INSTALL_OGBOOT_TARGET} copyServerFiles ${INSTALL_OGBOOT_TARGET}