Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use is_installed as more as possible #125

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions raspi-config
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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/[email protected] /etc/systemd/system/getty.target.wants/[email protected]
rm /etc/systemd/system/[email protected]/autologin.conf
Expand All @@ -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/[email protected] /etc/systemd/system/getty.target.wants/[email protected]
cat > /etc/systemd/system/[email protected]/autologin.conf << EOF
Expand Down Expand Up @@ -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
Expand Down