Removes delete isc dhcp, adds depedencies neccesaries for kea dhcp instalation and adds warnings to unistall isc-dhcp

Luis Gerardo Romero Garcia 2023-11-28 11:18:04 +01:00
parent 989c4b28f6
commit 4dcf0a6a04
1 changed files with 18 additions and 23 deletions

View File

@ -53,8 +53,7 @@ function userData ()
DEFAULT_OPENGNSYS_DB_PASSWD="passusuog" # Clave por defecto de acceso a la base de datos
DEFAULT_OPENGNSYS_CLIENT_PASSWD="og" # Clave por defecto de acceso del cliente
DEFAULT_OGLIVE="ogLive-focal-5.11.0-22-generic-amd64-r20210413.992ebb9.iso" # Cliente ogLive
DEFAULT_INSTALL_KEA=true
DEFAULT_UNINSTALL_OLD_DHCP=false
DEFAULT_INSTALL_KEA=true # Instalar Kea DHCP
echo -e "\\nOpenGnsys Installation"
echo "=============================="
@ -67,7 +66,6 @@ function userData ()
OPENGNSYS_CLIENT_PASSWD="$DEFAULT_OPENGNSYS_CLIENT_PASSWD"
OGLIVE="$DEFAULT_OGLIVE"
INSTALL_KEA="$DEFAULT_INSTALL_KEA"
UNINSTALL_OLD_DHCP="$DEFAULT_UNINSTALL_OLD_DHCP"
return
fi
@ -104,16 +102,7 @@ function userData ()
echo -n -e "\\n\\nDo you want to install Kea DHCP? (Y/N): (${DEFAULT_INSTALL_KEA}): "
read -r installKea
if [[ $installKea == "Y" || $installKea == "y" ]]; then
INSTALL_KEA=true
echo -n -e "\\n\\It is highly recommended to uninstall the old DHCP service before installing Kea DHCP. Do you want to uninstall the old DHCP service? (Y/N): (${DEFAULT_UNINSTALL_OLD_DHCP}): "
read -r uninstallOldDHCP
if [[ $uninstallOldDHCP == "Y" || $uninstallOldDHCP == "y" ]]; then
UNINSTALL_OLD_DHCP=true
else
UNINSTALL_OLD_DHCP=false
fi
else
INSTALL_KEA=false
fi
@ -213,8 +202,8 @@ 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 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 libjansson-dev libssl-dev shim-signed grub-efi-amd64-signed gawk libdbi-dev libdbi1 libdbd-mysql liblz4-tool )
DEPENDENCIES=( subversion apache2 mysql-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 gettext moreutils jq wakeonlan udpcast libev-dev libjansson-dev libssl-dev shim-signed grub-efi-amd64-signed gawk libdbi-dev libdbi1 libdbd-mysql liblz4-tool )
DEPENDENCIES=( subversion apache2 php php-ldap php-fpm mysql-server php-mysql 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 libjansson-dev libssl-dev shim-signed grub-efi-amd64-signed gawk libdbi-dev libdbi1 libdbd-mysql liblz4-tool libboost-dev liblog4cplus-dev libboost-system-dev )
# DEPENDENCIES=( subversion apache2 mysql-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 gettext moreutils jq wakeonlan udpcast libev-dev libjansson-dev libssl-dev shim-signed grub-efi-amd64-signed gawk libdbi-dev libdbi1 libdbd-mysql liblz4-tool )
INSTALLKEADEPENDENCY='pushd /tmp; wget https://downloads.isc.org/isc/kea/2.0.2/kea-2.0.2.tar.gz; tar xvzf kea-2.0.2.tar.gz; cd kea-2.0.2; ./configure --prefix=/etc/kea; make; make install; popd'
UPDATEPKGLIST="apt-get update"
@ -1639,7 +1628,20 @@ function installationSummary()
echoAndLog " running \"$INSTALL_TARGET/lib/security-config\" script as root."
echoAndLog "It's strongly recommended to synchronize this server with an NTP server."
echoAndLog "Review or edit all configuration files."
echoAndLog "Insert DHCP configuration data and restart service."
# Check if isc-dhcp-server is installed
if checkPackage isc-dhcp-server >/dev/null 2>&1; then
echoAndLog "Warning: isc-dhcp-server was detected as installed. It is highly recommended to uninstall isc-dhcp-server after installing Kea DHCP."
fi
# Check if isc-dhcp-client is installed
if checkPackage isc-dhcp-client >/dev/null 2>&1; then
echoAndLog "Warning: isc-dhcp-client was detected as installed. It is highly recommended to uninstall isc-dhcp-client after installing Kea DHCP."
fi
# Check if isc-dhcp-common is installed
if checkPackage isc-dhcp-common >/dev/null 2>&1; then
echoAndLog "Warning: isc-dhcp-common was detected as installed. It is highly recommended to uninstall isc-dhcp-common after installing Kea DHCP."
fi
echoAndLog "Optional: If you want to use BURG as boot manager, run"
echoAndLog " \"curl $DOWNLOADURL/burg.tgz -o $INSTALL_TARGET/client/lib/burg.tgz\" as root."
echoAndLog "Optional: Log-in as Web Console admin user."
@ -1715,13 +1717,6 @@ if [ "$INSTALL_KEA" ]; then
eval ${INSTALLKEADEPENDENCY[i]}
done
if [ "$UNINSTALL_OLD_DHCP" ]; then
echoAndLog "Uninstalling old DHCP"
for (( i=0; i<${#UNINSTALL_DHCP[*]}; i++ )); do
eval ${UNINSTALL_DHCP[i]}
done
fi
fi
if [ -n "$INSTALLEXTRADEPS" ]; then