diff --git a/3rdparty/mmu_man/scripts/HardwareChecker.sh b/3rdparty/mmu_man/scripts/HardwareChecker.sh index a80b3425fc..5b7467e112 100755 --- a/3rdparty/mmu_man/scripts/HardwareChecker.sh +++ b/3rdparty/mmu_man/scripts/HardwareChecker.sh @@ -1,7 +1,7 @@ #!/bin/sh # HardwareChecker.sh for Haiku # -# Copyright 2011, François Revol . +# Copyright 2011-2014, François Revol . # # Distributed under the MIT License # @@ -12,6 +12,7 @@ netcat=netcat report_site=fake.haikuware.com report_cgi=http://haikuware.com/hwreport.php +packages="dmidecode" do_notify () { @@ -22,12 +23,21 @@ do_notify () notify --type progress \ --messageID hwck_$$ \ --icon /system/apps/Devices \ - --app HardwareChecker \ + --group HardwareChecker \ --title "progress:" --progress "$p" "$m" "$@" } +try_install_packages () +{ + which pkgman >/dev/null 2>&1 || return + + for p in $packages; do + pkgman install "$p" || alert "Unable to install package '$p'" "Ok" + done +} + start_fake_httpd () { report_port=8989 @@ -35,7 +45,7 @@ start_fake_httpd () report_ack="

Done! You can close this window now.

" report_cgi=http://127.0.0.1:$report_port/hwreport ( - # force a previous isntance to close + # force a previous instance to close $netcat 127.0.0.1 8989 < /dev/null > /dev/null echo "listening on port $report_port" # @@ -273,10 +283,16 @@ check_utils () ifconfig echo "" - echo "

installoptionalpackage -l

" + echo "

pkgman list-repos

" + echo "(list of configured package repositories)
" + echo "" + + echo "

pkgman search -a

" echo "(list of installed packaged)
" - echo "" echo "
" @@ -360,6 +376,9 @@ tf=/tmp/hw_checker_$$.html do_notify 0.0 "Checking for network..." detect_network +do_notify 0.0 "Checking for needed packages..." +try_install_packages + check_all > "$tf" open "$tf"