Subversion Repositories ALCASAR

Rev

Rev 2438 | Rev 2446 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 2438 Rev 2444
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
#  $Id: alcasar.sh 2438 2017-11-12 23:19:57Z richard $ 
2
#  $Id: alcasar.sh 2444 2017-11-26 23:08:16Z richard $ 
3
 
3
 
4
# alcasar.sh
4
# alcasar.sh
5
 
5
 
6
# ALCASAR Install script -  CopyLeft ALCASAR Team [Rexy + 3abtux + Steweb + Crox + ...] 
6
# ALCASAR Install script -  CopyLeft ALCASAR Team [Rexy + 3abtux + Steweb + Crox + ...] 
7
# Ce programme est un logiciel libre ; This software is free and open source
7
# Ce programme est un logiciel libre ; This software is free and open source
Line 391... Line 391...
391
    pbkdf2=`( echo $grub2pwd ; echo $grub2pwd ) | \
391
    pbkdf2=`( echo $grub2pwd ; echo $grub2pwd ) | \
392
        LC_ALL=C /usr/bin/grub2-mkpasswd-pbkdf2 | \
392
        LC_ALL=C /usr/bin/grub2-mkpasswd-pbkdf2 | \
393
        grep -v '[eE]nter password:' | \
393
        grep -v '[eE]nter password:' | \
394
        sed -e "s/PBKDF2 hash of your password is //"`
394
        sed -e "s/PBKDF2 hash of your password is //"`
395
    echo "GRUB2_PASSWORD=$pbkdf2" > /boot/grub2/user.cfg
395
    echo "GRUB2_PASSWORD=$pbkdf2" > /boot/grub2/user.cfg
396
    [ -e /etc/grub.d/default-10_linux ] || cp /etc/grub.d/10_linux /etc/grub.d/default-10_linux
396
    [ -e /root/grub.default ] || cp /etc/grub.d/10_linux /root/grub.default
397
    cp -f $DIR_CONF/grub-10_linux /etc/grub.d/10_linux  # Request password only on menu editing attempts (not when selecting an entry)
397
    cp -f $DIR_CONF/grub-10_linux /etc/grub.d/10_linux  # Request password only on menu editing attempts (not when selecting an entry)
398
    chmod 0600 /boot/grub2/user.cfg
398
    chmod 0600 /boot/grub2/user.cfg
399
	echo "# Login name and password to protect GRUB2 boot menu (!!!qwerty keyboard) : " > $PASSWD_FILE
399
	echo "# Login name and password to protect GRUB2 boot menu (!!!qwerty keyboard) : " > $PASSWD_FILE
400
    echo "GRUB2_user=root" >> $PASSWD_FILE
400
    echo "GRUB2_user=root" >> $PASSWD_FILE
401
    echo "GRUB2_password=$grub2pwd" >> $PASSWD_FILE
401
    echo "GRUB2_password=$grub2pwd" >> $PASSWD_FILE
Line 1641... Line 1641...
1641
##################################################
1641
##################################################
1642
dnsmasq ()
1642
dnsmasq ()
1643
{
1643
{
1644
	[ -d /var/log/dnsmasq ] || mkdir /var/log/dnsmasq
1644
	[ -d /var/log/dnsmasq ] || mkdir /var/log/dnsmasq
1645
# 1st dnsmasq listen on udp 53 ("dnsmasq - forward"). It's used as dhcp server only if "alcasar-bypass" is on.
1645
# 1st dnsmasq listen on udp 53 ("dnsmasq - forward"). It's used as dhcp server only if "alcasar-bypass" is on.
-
 
1646
    [ -e /etc/dnsmasq.conf.default ] || cp /etc/dnsmasq.conf /etc/dnsmasq.conf.default
1646
	cat << EOF > /etc/dnsmasq.conf
1647
    cat << EOF > /etc/dnsmasq.conf
1647
# Configuration file for "dnsmasq in forward mode"
1648
# Configuration file for "dnsmasq in forward mode"
1648
conf-file=$DIR_DEST_ETC/alcasar-dns-name	# local DNS resolutions
1649
conf-file=$DIR_DEST_ETC/alcasar-dns-name	# local DNS resolutions
1649
listen-address=$PRIVATE_IP
1650
listen-address=$PRIVATE_IP
1650
pid-file=/var/run/dnsmasq.pid
1651
pid-file=/var/run/dnsmasq.pid
1651
listen-address=127.0.0.1
1652
listen-address=127.0.0.1