Browse Source

send stderr from which to /dev/null too

keep-around/43e990ab3f4cc50982f8dbc32e3465ca7c827876
Joey Hess 15 years ago
parent
commit
e98a704973
  1. 4
      tests/desktop
  2. 2
      tests/laptop

4
tests/desktop

@ -69,7 +69,7 @@ enough_disk () {
}
desktop_hardware () {
if which laptop-detect >/dev/null && \
if which laptop-detect >/dev/null 2>&1 && \
laptop-detect; then
# Nearly always appropriate to include a desktop.
return 0
@ -83,7 +83,7 @@ desktop_hardware () {
}
rack_hardware () {
if which dmidecode >/dev/null && \
if which dmidecode >/dev/null 2>&1 && \
dmidecode | grep -q 'Type: Rack Mount Chassis'; then
return 0
fi

2
tests/laptop

@ -2,7 +2,7 @@
# Causes a task to be selected if the machine appears to be a laptop.
if [ "$NEW_INSTALL" ]; then
if which laptop-detect >/dev/null && \
if which laptop-detect >/dev/null 2>&1 && \
laptop-detect; then
exit 2 # mark for install
else

Loading…
Cancel
Save