393,6 → 393,9 |
grep -v '[eE]nter password:' | \ |
sed -e "s/PBKDF2 hash of your password is //"` |
echo "GRUB2_PASSWORD=$pbkdf2" > /boot/grub2/user.cfg |
[ -e /etc/grub.d/default-10_linux ] || cp /etc/grub.d/10_linux /etc/grub.d/default-10_linux |
cp -f $DIR_CONF/grub-10_linux /etc/grub.d/10_linux # Request password only on menu editing attempts (not when selecting an entry) |
/usr/bin/update-grub2 |
chmod 0600 /boot/grub2/user.cfg |
echo "# Login name and password to protect GRUB2 boot menu (!!!qwerty keyboard) : " > $PASSWD_FILE |
echo "GRUB2_user=root" >> $PASSWD_FILE |
2183,30 → 2186,26 |
echo "net.ipv6.conf.default.autoconf = 0" >> /etc/sysctl.d/alcasar.conf |
# switch to multi-users runlevel (instead of x11) |
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 -c "virtio|vmwgfx"` # test if in VM |
# grub_already_modified=`grep -c ALCASAR /boot/grub/menu.lst` |
# [ -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 |
# $SED "/^kernel/s/BOOT_IMAGE=linux /BOOT_IMAGE=linux-nonfb /" /boot/grub/menu.lst |
# $SED "/^gfxmenu/d" /boot/grub/menu.lst |
# if [ $vm_vga == 0 ] # is not a VM |
# then |
# $SED "/BOOT_IMAGE=linux-nonfb/s/$/ vga=791/" /boot/grub/menu.lst # change display to 1024*768 (vga791) only if not on VM and only on ALCASAR entry |
# fi |
# 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 |
# GRUB2 modifications (Wait time : 3s - ALCASAR entry - VGA=791 - Change the default banner |
[ -e /etc/default/grub.default ] || cp /etc/default/grub /etc/default/grub.default |
$SED "s?^GRUB_TIMEOUT=.*?GRUB_TIMEOUT=3?g" /etc/default/grub |
$SED "s?^GRUB_DISTRIBUTOR=.*?GRUB_DISTRIBUTOR=ALCASAR (on Mageia)?g" /etc/default/grub/ |
[ -e /etc/mageia-release.default ] || cp /etc/mageia-release /etc/mageia-release.default |
vm_vga=`lsmod | egrep -c "virtio|vmwgfx"` # test if in VM |
if [ $vm_vga == 0 ] # is not a VM |
then |
cp -f $DIR_CONF/banner /etc/mageia-release # ALCASAR ASCII-Art |
echo >> /etc/mageia-release |
$SED "s?ĜRUB_CMDLINE_LINUX_DEFAULT=\"?&vga=791 ?" /etc/default/grub |
fi |
if [ $Lang == "fr" ] |
then |
echo "Bienvenue sur ALCASAR V$VERSION" >> /etc/mageia-release |
echo "Connectez-vous à l'URL 'http://alcasar.localdomain/acc'" >> /etc/mageia-release |
else |
echo "Welcome on ALCASAR V$VERSION" >> /etc/mageia-release |
echo "Connect to 'http://alcasar.localdomain/acc'" >> /etc/mageia-release |
fi |
# Load and apply the previous conf file |
if [ "$mode" = "update" ] |
then |