Fix for OracleLinux and RedHat case
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Adrien Reslinger 2021-04-13 18:09:15 +02:00
parent 0db0707af4
commit eb1f997830
Signed by: adrien
GPG key ID: DA7B27055C66D6DE

View file

@ -39,7 +39,7 @@ else
exit 1
fi
#DESKTOP=desktop
INST_OPTIONS="lang=fr_FR keymap=fr-latin9 panic=1 ks.sendsn ks.sendmac inst.sshd=1 net.ifnames=0 biosdevname=0 $DESKTOP"
INST_OPTIONS="inst.lang=fr_FR inst.keymap=fr-latin9 panic=1 ks.sendsn ks.sendmac inst.sshd=1 net.ifnames=0 biosdevname=0 $DESKTOP"
INST_OPTIONS="${INST_OPTIONS} inst.vnc inst.vncpassword=SDFGHJKL"
if [ -z "$DNS" ]; then
if [ $(whois $IP | grep -ci dedibox) -gt 0 ]; then
@ -66,7 +66,7 @@ fi
if [ ! -z "$STATIC" ]; then
INST_OPTIONS="ip=$IP::$GW:$MASK:$(hostname -s):$IF:off:${DNS/,*} ${INST_OPTIONS}"
fi
if [ -f /boot/grub2/grub.cfg -o -f /boot/efi/EFI/centos/grub.cfg ]; then
if [ -f /boot/grub2/grub.cfg -o -f /boot/efi/EFI/centos/grub.cfg -o -f /boot/efi/EFI/redhat/grub.cfg ]; then
if [ $(sed 's/ /\n/g' /proc/cmdline | grep -c console) -gt 1 ]; then
# echo "On ajoute les console pour avoir une config également en serial"
CONSOLE="$(for i in `sed 's/ /\n/g' /proc/cmdline | grep console`; do echo -n "$i "; done | sed 's/ $//')"
@ -97,7 +97,9 @@ menuentry 'CentOS ${CENTOS_VERSION} Install (PXE)' --unrestricted {
initrd $PARTBOOT/initrd.img
}
EOF
if [ -d /sys/firmware/efi -a -e /boot/efi/EFI/centos/grub.cfg ]; then
if [ -d /sys/firmware/efi -a -e /boot/efi/EFI/redhat/grub.cfg ]; then
CONFDIR=/boot/efi/EFI/redhat
elif [ -d /sys/firmware/efi -a -e /boot/efi/EFI/centos/grub.cfg ]; then
CONFDIR=/boot/efi/EFI/centos
else
CONFDIR=/boot/grub2