mirror of
https://github.com/brain-hackers/brain-config.git
synced 2025-01-18 17:30:07 +09:00
Fix auto-login and typos
This commit is contained in:
parent
f2f919f0db
commit
586bee19c9
34
raspi-config
34
raspi-config
@ -332,7 +332,7 @@ system instability, try a more modest overclock. Hold down
|
|||||||
shift during boot to temporarily disable overclock.
|
shift during boot to temporarily disable overclock.
|
||||||
See http://elinux.org/RPi_Overclocking for more information.\
|
See http://elinux.org/RPi_Overclocking for more information.\
|
||||||
" 20 70 1
|
" 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" \
|
"None" "700MHz ARM, 250MHz core, 400MHz SDRAM, 0 overvolt" \
|
||||||
"Modest" "800MHz 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" \
|
"Medium" "900MHz ARM, 250MHz core, 450MHz SDRAM, 2 overvolt" \
|
||||||
@ -709,25 +709,21 @@ do_boot_behaviour_new() {
|
|||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
case "$BOOTOPT" in
|
case "$BOOTOPT" in
|
||||||
B1*)
|
B1*)
|
||||||
if [ -e /etc/init.d/lightdm ]; then
|
if [ $SYSTEMD -eq 1 ]; then
|
||||||
if [ $SYSTEMD -eq 1 ]; then
|
systemctl set-default multi-user.target
|
||||||
systemctl set-default multi-user.target
|
ln -fs /lib/systemd/system/getty@.service /etc/systemd/system/getty.target.wants/getty@tty1.service
|
||||||
ln -fs /lib/systemd/system/getty@.service /etc/systemd/system/getty.target.wants/getty@tty1.service
|
else
|
||||||
else
|
[ -e /etc/init.d/lightdm ] && update-rc.d lightdm disable 2
|
||||||
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/"
|
||||||
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
|
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
B2*)
|
B2*)
|
||||||
if [ -e /etc/init.d/lightdm ]; then
|
if [ $SYSTEMD -eq 1 ]; then
|
||||||
if [ $SYSTEMD -eq 1 ]; then
|
systemctl set-default multi-user.target
|
||||||
systemctl set-default multi-user.target
|
ln -fs /etc/systemd/system/autologin@.service /etc/systemd/system/getty.target.wants/getty@tty1.service
|
||||||
ln -fs /etc/systemd/system/autologin@.service /etc/systemd/system/getty.target.wants/getty@tty1.service
|
else
|
||||||
else
|
[ -e /etc/init.d/lightdm ] && update-rc.d lightdm disable 2
|
||||||
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/"
|
||||||
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
|
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
B3*)
|
B3*)
|
||||||
@ -780,7 +776,7 @@ do_wait_for_network() {
|
|||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
if [ "$INTERACTIVE" = True ]; then
|
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" \
|
"Fast" "Boot without waiting for network connection" \
|
||||||
"Slow" "Wait for network connection before completing boot" \
|
"Slow" "Wait for network connection before completing boot" \
|
||||||
3>&1 1>&2 2>&3)
|
3>&1 1>&2 2>&3)
|
||||||
@ -812,7 +808,7 @@ EOF
|
|||||||
|
|
||||||
do_boot_behaviour() {
|
do_boot_behaviour() {
|
||||||
if [ "$INTERACTIVE" = True ]; then
|
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)" \
|
"Console" "Text console, requiring login (default)" \
|
||||||
"Desktop" "Log in as user 'pi' at the graphical desktop" \
|
"Desktop" "Log in as user 'pi' at the graphical desktop" \
|
||||||
3>&1 1>&2 2>&3)
|
3>&1 1>&2 2>&3)
|
||||||
|
Loading…
Reference in New Issue
Block a user