Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 2212 → Rev 2213

/alcasar.sh
2025,26 → 2025,28
ln -sf /lib/systemd/system/multi-user.target /etc/systemd/system/default.target
# GRUB modifications (only one time)
# Limit wait time to 3s - Create an alcasar entry instead of linux-nonfb - Change the default banner
vm_vga=`lsmod | egrep "virtio|vmwgfx" | wc -l` # test if in VM
grub_already_modified=`grep ALCASAR /boot/grub/menu.lst|wc -l`
[ -e /etc/mageia-release.default ] || cp /etc/mageia-release /etc/mageia-release.default
if [ $grub_already_modified == 0 ]
then
$SED "s?^timeout.*?timeout 3?g" /boot/grub/menu.lst
$SED "s?^title linux?title ALCASAR?g" /boot/grub/menu.lst
$SED "/^kernel/s/splash quiet //" /boot/grub/menu.lst
# change display to 1024*768 (vga791) only if not on VM
[ -e /etc/mageia-release.default ] || cp /etc/mageia-release /etc/mageia-release.default
vm_vga=`lsmod | egrep "virtio|vmwgfx" | wc -l`
if [ $vm_vga == 0 ] # is not a virtual machine (proxmox, vmware)
if [ $vm_vga == 0 ] # is not a VM
then
$SED "/^kernel/s/$/ vga=791/" /boot/grub/menu.lst
cp -f $DIR_CONF/banner /etc/mageia-release
echo " V$VERSION" >> /etc/mageia-release
else
echo "ALCASAR V$VERSION" > /etc/mageia-release
$SED "/^kernel/s/$/ vga=791/" /boot/grub/menu.lst # change display to 1024*768 (vga791) only if not on VM
fi
$SED "/^kernel/s/BOOT_IMAGE=linux /BOOT_IMAGE=linux-nonfb /" /boot/grub/menu.lst
$SED "/^gfxmenu/d" /boot/grub/menu.lst
fi
if [ $vm_vga == 0 ] # is not a VM
then
cp -f $DIR_CONF/banner /etc/mageia-release
echo " V$VERSION" >> /etc/mageia-release
else
echo "ALCASAR V$VERSION" > /etc/mageia-release
fi
$SED "/^kernel/s/BOOT_IMAGE=linux /BOOT_IMAGE=linux-nonfb /" /boot/grub/menu.lst
$SED "/^gfxmenu/d" /boot/grub/menu.lst
# Load and apply the previous conf file
if [ "$mode" = "update" ]
then