[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[PATCH] early exit for 22gnome_panel_data



Hi

I am using a Debian Live based system without the package
gnome-panel-data. Booting up the system always produces an error message
triggered by the live-bottom script 22gnome_panel_data. This script
should exit much earlier if the package gnome-panel-data is not
installed.
Please see the attached patch for a fix.

Regards

Ronny

-- 
Ronny Standtke                 Fachhochschule Nordwestschweiz
Dozent Medienpädagogik / ICT   Pädagogische Hochschule
Telefon: +41 32 627 92 47      Obere Sternengasse 7
Mobil  : +41 79 786 81 82      4502 Solothurn
diff --git a/scripts/live-bottom/22gnome_panel_data b/scripts/live-bottom/22gnome_panel_data
index bd0be26..2624855 100755
--- a/scripts/live-bottom/22gnome_panel_data
+++ b/scripts/live-bottom/22gnome_panel_data
@@ -31,6 +31,13 @@ log_begin_msg "Configuring gnome-panel-data"
 
 # live-initramfs script
 
+panel_version=$(chroot /root /usr/bin/dpkg-query -W --showformat='${Version}' gnome-panel-data 2>/dev/null) || panel_version=""
+
+if [ -z "${panel_version}" ]
+then
+	exit 0
+fi
+
 if [ -x /root/usr/sbin/laptop-detect ]
 then
 	if chroot /root laptop-detect
@@ -39,9 +46,7 @@ then
 	fi
 fi
 
-panel_version=$(chroot /root /usr/bin/dpkg-query -W --showformat='${Version}' gnome-panel-data 2>/dev/null) || panel_version=""
-
-if [ -n "${panel_version}" ] && [ -n "${USERNAME}" ]
+if [ -n "${USERNAME}" ]
 then
 	chroot /root sudo -u "${USERNAME}" gconftool-2 -s -t bool /apps/panel/global/disable_lock_screen true
 fi

Reply to: