mirror of
https://github.com/brain-hackers/brain-config.git
synced 2025-01-03 10:00:07 +09:00
complain if user tries to user boot to desktop without lightdm installed
This commit is contained in:
parent
a7a7b12ad0
commit
51095a837a
25
raspi-config
25
raspi-config
@ -317,16 +317,21 @@ do_ssh() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
do_boot_behaviour() {
|
do_boot_behaviour() {
|
||||||
whiptail --yesno "Should we boot straight to desktop?" 20 60 2
|
if [ -e /etc/init.d/lightdm ]; then
|
||||||
RET=$?
|
whiptail --yesno "Should we boot straight to desktop?" 20 60 2
|
||||||
if [ $RET -eq 0 ]; then # yes
|
RET=$?
|
||||||
update-rc.d lightdm enable 2
|
if [ $RET -eq 0 ]; then # yes
|
||||||
sed /etc/lightdm/lightdm.conf -i -e "s/^#autologin-user=.*/autologin-user=pi/"
|
update-rc.d lightdm enable 2
|
||||||
ASK_TO_REBOOT=1
|
sed /etc/lightdm/lightdm.conf -i -e "s/^#autologin-user=.*/autologin-user=pi/"
|
||||||
elif [ $RET -eq 1 ]; then # no
|
ASK_TO_REBOOT=1
|
||||||
update-rc.d lightdm disable 2
|
elif [ $RET -eq 1 ]; then # no
|
||||||
ASK_TO_REBOOT=1
|
update-rc.d lightdm disable 2
|
||||||
else # user hit escape
|
ASK_TO_REBOOT=1
|
||||||
|
else # user hit escape
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
whiptail --msgbox "Do sudo apt-get install lightdm to allow configuration of boot to desktop" 20 60 2
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user