From 17a715ad75e8ef67fc8f92b0eedf7dacde2a77fb Mon Sep 17 00:00:00 2001 From: spl Date: Tue, 10 Jan 2017 14:11:21 +0000 Subject: [PATCH] Do not allow splash screen to be changed for a live image. --- raspi-config | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/raspi-config b/raspi-config index 6ba0908..4b7f274 100755 --- a/raspi-config +++ b/raspi-config @@ -49,6 +49,11 @@ get_pi_type() { fi } +is_live() { + grep -q "boot=live" $CMDLINE + return $? +} + get_init_sys() { if command -v systemctl > /dev/null && systemctl | grep -q '\-\.mount'; then SYSTEMD=1 @@ -1510,11 +1515,18 @@ do_advanced_menu() { } do_boot_menu() { - FUN=$(whiptail --title "Raspberry Pi Software Configuration Tool (raspi-config)" --menu "Boot Options" $WT_HEIGHT $WT_WIDTH $WT_MENU_HEIGHT --cancel-button Back --ok-button Select \ - "B1 Desktop / CLI" "Choose whether to boot into a desktop environment or the command line" \ - "B2 Wait for Network at Boot" "Choose whether to wait for network connection during boot" \ - "B3 Splash Screen" "Choose graphical splash screen or text boot" \ - 3>&1 1>&2 2>&3) + if is_live ; then + FUN=$(whiptail --title "Raspberry Pi Software Configuration Tool (raspi-config)" --menu "Boot Options" $WT_HEIGHT $WT_WIDTH $WT_MENU_HEIGHT --cancel-button Back --ok-button Select \ + "B1 Desktop / CLI" "Choose whether to boot into a desktop environment or the command line" \ + "B2 Wait for Network at Boot" "Choose whether to wait for network connection during boot" \ + 3>&1 1>&2 2>&3) + else + FUN=$(whiptail --title "Raspberry Pi Software Configuration Tool (raspi-config)" --menu "Boot Options" $WT_HEIGHT $WT_WIDTH $WT_MENU_HEIGHT --cancel-button Back --ok-button Select \ + "B1 Desktop / CLI" "Choose whether to boot into a desktop environment or the command line" \ + "B2 Wait for Network at Boot" "Choose whether to wait for network connection during boot" \ + "B3 Splash Screen" "Choose graphical splash screen or text boot" \ + 3>&1 1>&2 2>&3) + fi RET=$? if [ $RET -eq 1 ]; then return 0