diff options
author | imp <imp@FreeBSD.org> | 2010-07-06 23:29:55 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2010-07-06 23:29:55 +0000 |
commit | 8d145490dbfe0491db78efc71bc970785a6c84aa (patch) | |
tree | 492950c6ae72c8a9bfa6aa57b2c96c4ddb590b92 /usr.sbin/pc-sysinstall/backend-query | |
parent | 4f88b67ea991bc95a6a73ad5cdd4ffd4d3510351 (diff) | |
download | FreeBSD-src-8d145490dbfe0491db78efc71bc970785a6c84aa.zip FreeBSD-src-8d145490dbfe0491db78efc71bc970785a6c84aa.tar.gz |
A few patches from Ed Maste by way of Kris Moore
1. Change detect-vmware to detect-emulation
2. improve laptop detection
3. better, network descriptions
Diffstat (limited to 'usr.sbin/pc-sysinstall/backend-query')
-rw-r--r-- | usr.sbin/pc-sysinstall/backend-query/Makefile | 2 | ||||
-rwxr-xr-x | usr.sbin/pc-sysinstall/backend-query/detect-laptop.sh | 9 | ||||
-rwxr-xr-x | usr.sbin/pc-sysinstall/backend-query/detect-nics.sh | 21 |
3 files changed, 13 insertions, 19 deletions
diff --git a/usr.sbin/pc-sysinstall/backend-query/Makefile b/usr.sbin/pc-sysinstall/backend-query/Makefile index f516f0b..1deed3f 100644 --- a/usr.sbin/pc-sysinstall/backend-query/Makefile +++ b/usr.sbin/pc-sysinstall/backend-query/Makefile @@ -1,6 +1,6 @@ # $FreeBSD$ -FILES= detect-laptop.sh detect-nics.sh detect-vmware.sh disk-info.sh \ +FILES= detect-laptop.sh detect-nics.sh detect-emulation.sh disk-info.sh \ disk-list.sh disk-part.sh enable-net.sh list-config.sh list-components.sh \ list-mirrors.sh list-rsync-backups.sh list-tzones.sh query-langs.sh \ send-logs.sh setup-ssh-keys.sh sys-mem.sh test-live.sh test-netup.sh \ diff --git a/usr.sbin/pc-sysinstall/backend-query/detect-laptop.sh b/usr.sbin/pc-sysinstall/backend-query/detect-laptop.sh index 0c8c94a..4772c2f 100755 --- a/usr.sbin/pc-sysinstall/backend-query/detect-laptop.sh +++ b/usr.sbin/pc-sysinstall/backend-query/detect-laptop.sh @@ -25,9 +25,8 @@ # # $FreeBSD$ -dmesgLine=`dmesg | grep "acpi_acad0"` -if test "${dmesgLine}" = ""; then - echo "laptop: NO" -else +if devinfo | grep 'acpi_acad0' >/dev/null 2>/dev/null; then echo "laptop: YES" -fi +else + echo "laptop: NO" +fi diff --git a/usr.sbin/pc-sysinstall/backend-query/detect-nics.sh b/usr.sbin/pc-sysinstall/backend-query/detect-nics.sh index 57b5c51..2f7272a 100755 --- a/usr.sbin/pc-sysinstall/backend-query/detect-nics.sh +++ b/usr.sbin/pc-sysinstall/backend-query/detect-nics.sh @@ -25,17 +25,12 @@ # # $FreeBSD$ -rm /tmp/netCards 2>/dev/null -touch /tmp/netCards - -config="`ifconfig -l`" - -for i in $config -do - echo "${i}" | grep -e "lo0" -e "^fwe" -e "^fwip" -e "lo1" -e "^plip" -e "^pfsync" -e "^pflog" -e "^tun" >/dev/null 2>/dev/null - if [ "$?" != "0" ] - then - IDENT="<`dmesg | grep ^${i} | grep -v "miibus" | grep '<' | cut -d '<' -f 2 | cut -d '>' -f 1 | head -1`>" - echo "${i}: $IDENT" - fi +for i in $(ifconfig -l); do + case "${i%%[0-9]*}" in + lo|fwe|fwip|plip|pfsync|pflog|tun) + continue + ;; + esac + IDENT=$(dmesg | sed -n "s/^$i: <\(.*\)>.*$/\1/p" | head -1) + echo "${i}: <$IDENT>" done |