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

Bug#398981: default desktop to off on rack-based systems



reassign 398981 tasksel
notfound 398981 2.23
found 398981 2.67
retitle 398981 default desktop to off on rack systems
tags 398981 + patch
thanks

I placed the rack detection stuff where I did because there
was a placeholder for it there - but, it might make sense to
move it earlier since there's no point in doing the
common_desktop_architecture test if we already know its a rack
system.

diff -urN tasksel-2.67.orig/debian/changelog tasksel-2.68/debian/changelog
--- tasksel-2.67.orig/debian/changelog	2007-04-18 02:40:47.000000000 +0100
+++ tasksel-2.68/debian/changelog	2007-06-21 13:29:13.000000000 +0100
@@ -1,3 +1,10 @@
+tasksel (2.68) UNRELEASED; urgency=low
+
+  * Use dmidecode to check if the chassis is of type "rack".
+    If it is, unmark the desktop task by default.
+
+ -- dann frazier <dannf@debian.org>  Thu, 21 Jun 2007 13:27:27 +0100
+
 tasksel (2.67) unstable; urgency=low
 
   [ Translations of tasks ]
diff -urN tasksel-2.67.orig/tests/desktop tasksel-2.68/tests/desktop
--- tasksel-2.67.orig/tests/desktop	2007-01-02 21:20:51.000000000 +0000
+++ tasksel-2.68/tests/desktop	2007-06-21 13:48:37.000000000 +0100
@@ -81,6 +81,14 @@
 	return 1
 }
 
+rack_hardware () {
+	if test -x /usr/sbin/dmidecode && \
+		 /usr/sbin/dmidecode | grep -q 'Type: Rack Mount Chassis'; then
+		return 0
+	fi
+	return 1
+}
+
 if ! enough_ram || ! enough_disk; then
 	unmark
 fi
@@ -92,12 +100,15 @@
 if unlikely_desktop_architecture; then
 	unmark
 elif common_desktop_architecture; then
-	# XXX further heuristics here to avoid selecting the task on
-	# high-end hardware that's intended to be used as a server.
-	# For example, if it has two NICs with link, it's probably a
-	# server. If it's rackmountable, a server, etc.
-
-	mark # probably a desktop ...
+	if rack_hardware; then
+		# XXX further heuristics here to avoid selecting the task on
+		# high-end hardware that's intended to be used as a server.
+		# For example, if it has two NICs with link, it's probably a
+		# server. If it's rackmountable, a server, etc.
+		unmark
+	else
+		mark # probably a desktop ...
+	fi
 else
 	# XXX further heuristics here
 	:



-- 
dann frazier




Reply to: