Fix auto-login and typos

This commit is contained in:
Serge Schneider 2016-01-08 10:30:24 +00:00
parent f2f919f0db
commit 586bee19c9

View File

@ -332,7 +332,7 @@ system instability, try a more modest overclock. Hold down
shift during boot to temporarily disable overclock.
See http://elinux.org/RPi_Overclocking for more information.\
" 20 70 1
OVERCLOCK=$(whiptail --menu "Chose overclock preset" 20 60 10 \
OVERCLOCK=$(whiptail --menu "Choose overclock preset" 20 60 10 \
"None" "700MHz ARM, 250MHz core, 400MHz SDRAM, 0 overvolt" \
"Modest" "800MHz ARM, 250MHz core, 400MHz SDRAM, 0 overvolt" \
"Medium" "900MHz ARM, 250MHz core, 450MHz SDRAM, 2 overvolt" \
@ -709,25 +709,21 @@ do_boot_behaviour_new() {
if [ $? -eq 0 ]; then
case "$BOOTOPT" in
B1*)
if [ -e /etc/init.d/lightdm ]; then
if [ $SYSTEMD -eq 1 ]; then
systemctl set-default multi-user.target
ln -fs /lib/systemd/system/getty@.service /etc/systemd/system/getty.target.wants/getty@tty1.service
else
update-rc.d lightdm disable 2
sed /etc/inittab -i -e "s/1:2345:respawn:\/bin\/login -f pi tty1 <\/dev\/tty1 >\/dev\/tty1 2>&1/1:2345:respawn:\/sbin\/getty --noclear 38400 tty1/"
fi
if [ $SYSTEMD -eq 1 ]; then
systemctl set-default multi-user.target
ln -fs /lib/systemd/system/getty@.service /etc/systemd/system/getty.target.wants/getty@tty1.service
else
[ -e /etc/init.d/lightdm ] && update-rc.d lightdm disable 2
sed /etc/inittab -i -e "s/1:2345:respawn:\/bin\/login -f pi tty1 <\/dev\/tty1 >\/dev\/tty1 2>&1/1:2345:respawn:\/sbin\/getty --noclear 38400 tty1/"
fi
;;
B2*)
if [ -e /etc/init.d/lightdm ]; then
if [ $SYSTEMD -eq 1 ]; then
systemctl set-default multi-user.target
ln -fs /etc/systemd/system/autologin@.service /etc/systemd/system/getty.target.wants/getty@tty1.service
else
update-rc.d lightdm disable 2
sed /etc/inittab -i -e "s/1:2345:respawn:\/sbin\/getty --noclear 38400 tty1/1:2345:respawn:\/bin\/login -f pi tty1 <\/dev\/tty1 >\/dev\/tty1 2>&1/"
fi
if [ $SYSTEMD -eq 1 ]; then
systemctl set-default multi-user.target
ln -fs /etc/systemd/system/autologin@.service /etc/systemd/system/getty.target.wants/getty@tty1.service
else
[ -e /etc/init.d/lightdm ] && update-rc.d lightdm disable 2
sed /etc/inittab -i -e "s/1:2345:respawn:\/sbin\/getty --noclear 38400 tty1/1:2345:respawn:\/bin\/login -f pi tty1 <\/dev\/tty1 >\/dev\/tty1 2>&1/"
fi
;;
B3*)
@ -780,7 +776,7 @@ do_wait_for_network() {
return 1
fi
if [ "$INTERACTIVE" = True ]; then
RET=$(whiptail --menu "Chose boot option" 20 70 10 \
RET=$(whiptail --menu "Choose boot option" 20 70 10 \
"Fast" "Boot without waiting for network connection" \
"Slow" "Wait for network connection before completing boot" \
3>&1 1>&2 2>&3)
@ -812,7 +808,7 @@ EOF
do_boot_behaviour() {
if [ "$INTERACTIVE" = True ]; then
BOOTOPT=$(whiptail --menu "Chose boot option" 20 60 10 \
BOOTOPT=$(whiptail --menu "Choose boot option" 20 60 10 \
"Console" "Text console, requiring login (default)" \
"Desktop" "Log in as user 'pi' at the graphical desktop" \
3>&1 1>&2 2>&3)