Browse Source

* Use dmidecode to check if the chassis is of type "rack".

If it is, unmark the desktop task by default. Closes: #398981
keep-around/43e990ab3f4cc50982f8dbc32e3465ca7c827876
Joey Hess 15 years ago
parent
commit
fe2121cd88
  1. 6
      debian/changelog
  2. 25
      tests/desktop

6
debian/changelog

@ -30,7 +30,11 @@ tasksel (2.68) UNRELEASED; urgency=low
[ Joey Hess ]
* Powertop is de rigueur for laptops these days.
-- Joey Hess <joeyh@debian.org> Fri, 22 Jun 2007 00:19:43 +0100
[ Dann Frazier ]
* Use dmidecode to check if the chassis is of type "rack".
If it is, unmark the desktop task by default. Closes: #398981
-- Joey Hess <joeyh@debian.org> Sat, 23 Jun 2007 02:11:26 +0100
tasksel (2.67) unstable; urgency=low

25
tests/desktop

@ -81,6 +81,20 @@ desktop_hardware () {
return 1
}
rack_hardware () {
if [ -x "`which dmidecode 2>/dev/null`" ] && \
dmidecode | grep -q 'Type: Rack Mount Chassis'; then
return 0
fi
# 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.
return 1
}
if ! enough_ram || ! enough_disk; then
unmark
fi
@ -92,12 +106,11 @@ fi
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
unmark
else
mark # probably a desktop ...
fi
else
# XXX further heuristics here
:

Loading…
Cancel
Save