Skip to content

Commit e11b432

Browse files
committed
replace all dpkg -l with is_installed
1 parent 5a7f883 commit e11b432

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

raspi-config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ do_blanking() {
328328
CURRENT=1
329329
fi
330330
if [ "$INTERACTIVE" = True ]; then
331-
if [ "$(dpkg -l xscreensaver | tail -n 1 | cut -d ' ' -f 1)" = "ii" ]; then
331+
if is_installed xscreensaver; then
332332
whiptail --msgbox "Warning: xscreensaver is installed may override raspi-config settings" 20 60 2
333333
fi
334334
whiptail --yesno "Would you like to enable screen blanking?" $DEFAULT 20 60 2
@@ -1551,7 +1551,7 @@ do_gldriver() {
15511551
return 1
15521552
fi
15531553
for package in gldriver-test libgl1-mesa-dri; do
1554-
if [ "$(dpkg -l "$package" 2> /dev/null | tail -n 1 | cut -d ' ' -f 1)" != "ii" ]; then
1554+
if ! is_installed "$package"; then
15551555
missing_packages="$package $missing_packages"
15561556
fi
15571557
done

0 commit comments

Comments
 (0)