Browse Source

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

If it is, unmark the desktop task by default. Closes: #398981
tags/2.68
Joey Hess 14 years ago
parent
commit
fe2121cd88
2 changed files with 24 additions and 7 deletions
  1. +5
    -1
      debian/changelog
  2. +19
    -6
      tests/desktop

+ 5
- 1
debian/changelog View File

@@ -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



+ 19
- 6
tests/desktop View File

@@ -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