diff options
author | Irina Gómez <irinagomez@us.es> | 2019-02-25 12:14:14 +0100 |
---|---|---|
committer | Irina Gómez <irinagomez@us.es> | 2019-02-25 12:14:14 +0100 |
commit | e4324788f294ab6db30ec57631d2f08865db3a61 (patch) | |
tree | d1db1a62fce9b7a3a093b4c2f4415b56bc7af415 | |
parent | fa663a6cad58a49300211f3ebd704e889191fa7b (diff) |
#802 opengnsys_installer.sh and grub.cfg: configurate uief compatibility for tftpboot.
-rwxr-xr-x | installer/opengnsys_installer.sh | 15 | ||||
-rw-r--r-- | server/tftpboot/grub/grub.cfg | 6 |
2 files changed, 12 insertions, 9 deletions
diff --git a/installer/opengnsys_installer.sh b/installer/opengnsys_installer.sh index 17d36253..310c137e 100755 --- a/installer/opengnsys_installer.sh +++ b/installer/opengnsys_installer.sh @@ -170,7 +170,7 @@ OSVERSION="${OSVERSION%%.*}" # Configuración según la distribución GNU/Linux (usar minúsculas). case "$OSDISTRIB" in ubuntu|debian|linuxmint) - DEPENDENCIES=( subversion apache2 php php-ldap php-fpm mysql-server php-mysql isc-dhcp-server bittorrent tftp-hpa tftpd-hpa xinetd build-essential g++-multilib libmysqlclient-dev wget curl doxygen graphviz bittornado ctorrent samba rsync unzip netpipes debootstrap schroot squashfs-tools btrfs-tools procps arp-scan realpath php-curl gettext moreutils jq wakeonlan udpcast libev-dev shim-signed grub-efi-amd64-signed ) + DEPENDENCIES=( subversion apache2 php php-ldap php-fpm mysql-server php-mysql isc-dhcp-server bittorrent tftp-hpa tftpd-hpa xinetd build-essential g++-multilib libmysqlclient-dev wget curl doxygen graphviz bittornado ctorrent samba rsync unzip netpipes debootstrap schroot squashfs-tools btrfs-tools procps arp-scan realpath php-curl gettext moreutils jq udpcast libev-dev shim-signed grub-efi-amd64-signed ) UPDATEPKGLIST="apt-get update" INSTALLPKG="apt-get -y install --force-yes" CHECKPKG="dpkg -s \$package 2>/dev/null | grep Status | grep -qw install" @@ -263,18 +263,17 @@ TMPMYCNF=/tmp/.my.cnf.$$ # Modificar variables de configuración tras instalar paquetes del sistema. function autoConfigurePost() { -local f +local f MKNETDIR # Configuraciones específicas para Samba y TFTP en Debian 6. [ -z "$SYSTEMD" -a ! -e /etc/init.d/$SAMBASERV ] && SAMBASERV=samba [ ! -e $TFTPCFGDIR ] && TFTPCFGDIR=/srv/tftp -# Configuraciones específicas para SELinux permisivo en distintas versiones. -[ -f /selinux/enforce ] && echo 0 > /selinux/enforce -for f in /etc/sysconfig/selinux /etc/selinux/config; do - [ -f $f ] && perl -pi -e 's/SELINUX=enforcing/SELINUX=permissive/g' $f +# Preparar arranque en red con Grub. +for f in grub-mknetdir grub2-mknetdir; do + if which $f &>/dev/null; then MKNETDIR=$f; fi done -selinuxenabled 2>/dev/null && setenforce 0 2>/dev/null +$MKNETDIR --net-directory=$TFTPCFGDIR --subdir=grub } @@ -1151,7 +1150,7 @@ function installWebConsoleApacheConf() echoAndLog "${FUNCNAME}(): configuring PHP-FPM" service=$PHPFPMSERV $ENABLESERVICE; $STARTSERVICE - sockfile=$(find /run/php -name "php*.sock" -type s -print 2>/dev/null) + sockfile=$(find /run/php -name "php*.sock" -type s -print 2>/dev/null | tail -1) # Activar módulos de Apache. $APACHEENABLEMODS diff --git a/server/tftpboot/grub/grub.cfg b/server/tftpboot/grub/grub.cfg index 53db4d84..f1b53cb8 100644 --- a/server/tftpboot/grub/grub.cfg +++ b/server/tftpboot/grub/grub.cfg @@ -1,2 +1,6 @@ -source "$prefix/$net_default_mac" +insmod tr +tr -s mac : - $net_default_mac +tr -U -s MAC $mac +configfile=$prefix/01-$MAC +source "$configfile" |