[Fai-commit] r3275 - trunk/examples/simple/class
fai-repository at svn.debian.org
fai-repository at svn.debian.org
Wed Mar 1 17:29:36 UTC 2006
Author: lange
Date: 2006-03-01 17:29:36 +0000 (Wed, 01 Mar 2006)
New Revision: 3275
Modified:
trunk/examples/simple/class/20-hwdetect.source
Log:
test if discover is installed
Modified: trunk/examples/simple/class/20-hwdetect.source
===================================================================
--- trunk/examples/simple/class/20-hwdetect.source 2006-02-15 12:24:26 UTC (rev 3274)
+++ trunk/examples/simple/class/20-hwdetect.source 2006-03-01 17:29:36 UTC (rev 3275)
@@ -33,7 +33,7 @@
done
# let discover do most of the job
-/etc/init.d/discover start
+[ -x /etc/init.d/discover ] && /etc/init.d/discover start
# now we can mount the usb file system
mount -t usbfs usbfs /proc/bus/usb
@@ -44,13 +44,15 @@
# try to detect graphics card
# the variable videodrv may be used to generate the XF86config file
-if discover --version | grep "discover \(version \)*1\." ; then
- videodrv=$(discover --xdriver video 2> /dev/null)
-else
- videodrv=$(discover --data-path=xfree86/server/device/driver display)
-fi
-[ -n "$videodrv" ] && echo "videodrv=$videodrv" >> $LOGDIR/additional.var
-echo "Video card detected: $videodrv"
+[ -x "$(which discover)" ] && {
+ if discover --version | grep "discover \(version \)*1\." ; then
+ videodrv=$(discover --xdriver video 2> /dev/null)
+ else
+ videodrv=$(discover --data-path=xfree86/server/device/driver display)
+ fi
+ [ -n "$videodrv" ] && echo "videodrv=$videodrv" >> $LOGDIR/additional.var
+ echo "Video card detected: $videodrv"
+}
set_disk_info # calculate number of available disks
save_dmesg # save new boot messages (from loading modules)
More information about the Fai-commit
mailing list