[Fai-commit] r3264 -
people/lazyboy/fai-2.9-multidistribution/examples/simple/class
fai-repository at svn.debian.org
fai-repository at svn.debian.org
Mon Jan 23 20:51:49 UTC 2006
Author: lazyboy-guest
Date: 2006-01-23 20:51:49 +0000 (Mon, 23 Jan 2006)
New Revision: 3264
Modified:
people/lazyboy/fai-2.9-multidistribution/examples/simple/class/10-base-classes
people/lazyboy/fai-2.9-multidistribution/examples/simple/class/20-hwdetect.source
Log:
correct distribution specific hardware recognition and architecture defintion stuff
Modified: people/lazyboy/fai-2.9-multidistribution/examples/simple/class/10-base-classes
===================================================================
--- people/lazyboy/fai-2.9-multidistribution/examples/simple/class/10-base-classes 2006-01-23 20:50:16 UTC (rev 3263)
+++ people/lazyboy/fai-2.9-multidistribution/examples/simple/class/10-base-classes 2006-01-23 20:51:49 UTC (rev 3264)
@@ -5,19 +5,11 @@
uname -s | tr '[:lower:]' '[:upper:]'
-# FIXME: this will only work well for debian if
-# DISTRIBUTION=debian is set. but thuis will break other stuff, also
-# for the time being, we need to define more classes for sarge hosts
-# explicitly, see example host sarge!
-echo $DISTRIBUTION | tr '[:lower:]' '[:upper:]'
-case $DISTRIBUTION in
- debian)
- [ -x "`which dpkg`" ] && dpkg --print-installation-architecture | tr /a-z/ /A-Z/ ;;
- "")
- [ -x "`which dpkg`" ] && dpkg --print-installation-architecture | tr /a-z/ /A-Z/ ;;
- *)
- uname -i | tr '[:lower:]' '[:upper:]'
-esac
+if [ `which dpkg` ]; then
+ dpkg --print-installation-architecture | tr /a-z/ /A-Z/
+else
+ uname -i | tr '[:lower:]' '[:upper:]'
+fi
[ -f /boot/RUNNING_FROM_FAICD ] && echo "FAICD"
exit 0
Modified: people/lazyboy/fai-2.9-multidistribution/examples/simple/class/20-hwdetect.source
===================================================================
--- people/lazyboy/fai-2.9-multidistribution/examples/simple/class/20-hwdetect.source 2006-01-23 20:50:16 UTC (rev 3263)
+++ people/lazyboy/fai-2.9-multidistribution/examples/simple/class/20-hwdetect.source 2006-01-23 20:51:49 UTC (rev 3264)
@@ -32,20 +32,16 @@
modprobe -a $mod 1>/dev/null 2>&1
done
-#### SMITH
-case $DISTRIBUTION in
- debian)
- # let discover do most of the job
- /etc/init.d/discover start ;;
- "")
- # let discover do most of the job
- /etc/init.d/discover start ;;
- centos3)
- kudzu -q ;;
- *)
- # what can I do ?
-esac
+if [ -e /etc/init.d/discover ]; then
+ # let discover do most of the job
+ /etc/init.d/discover start
+fi
+
+if [ `which kudzu` ];then
+ kudzu -q
+fi
+
# now we can mount the usb file system
mount -t usbfs usbfs /proc/bus/usb
@@ -55,17 +51,17 @@
# try to detect graphics card
# the variable videodrv may be used to generate the XF86config file
-#### SMITH
-case $DISTRIBUTION in
- debian)
+
+if [ `which discover` ]; then
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" ;;
-esac
+fi
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