diff --git a/raspi-config b/raspi-config index 2809968c..adbf04df 100755 --- a/raspi-config +++ b/raspi-config @@ -328,7 +328,7 @@ do_blanking() { CURRENT=1 fi if [ "$INTERACTIVE" = True ]; then - if [ "$(dpkg -l xscreensaver | tail -n 1 | cut -d ' ' -f 1)" = "ii" ]; then + if is_installed xscreensaver; then whiptail --msgbox "Warning: xscreensaver is installed may override raspi-config settings" 20 60 2 fi whiptail --yesno "Would you like to enable screen blanking?" $DEFAULT 20 60 2 @@ -1142,7 +1142,7 @@ ExecStart=-/sbin/agetty --autologin $USER --noclear %I \$TERM EOF ;; B3*) - if [ -e /etc/init.d/lightdm ]; then + if is_installed lightdm; then systemctl set-default graphical.target ln -fs /lib/systemd/system/getty@.service /etc/systemd/system/getty.target.wants/getty@tty1.service rm /etc/systemd/system/getty@tty1.service.d/autologin.conf @@ -1154,7 +1154,7 @@ EOF fi ;; B4*) - if [ -e /etc/init.d/lightdm ]; then + if is_installed lightdm; then systemctl set-default graphical.target ln -fs /lib/systemd/system/getty@.service /etc/systemd/system/getty.target.wants/getty@tty1.service cat > /etc/systemd/system/getty@tty1.service.d/autologin.conf << EOF @@ -1551,7 +1551,7 @@ do_gldriver() { return 1 fi for package in gldriver-test libgl1-mesa-dri; do - if [ "$(dpkg -l "$package" 2> /dev/null | tail -n 1 | cut -d ' ' -f 1)" != "ii" ]; then + if ! is_installed "$package"; then missing_packages="$package $missing_packages" fi done