summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Lameter <christoph@gentoo.org>2002-07-30 17:34:15 +0000
committerChristoph Lameter <christoph@gentoo.org>2002-07-30 17:34:15 +0000
commitcd71735892ff0e685fb618c0277a6fb57c02b9e8 (patch)
tree60b9f2a959f51d843dff8eb48d15d24247ac5702 /sys-apps/discover
parentProvide newest version of livecd. Populate empty livecd directory. (diff)
downloadgentoo-2-cd71735892ff0e685fb618c0277a6fb57c02b9e8.tar.gz
gentoo-2-cd71735892ff0e685fb618c0277a6fb57c02b9e8.tar.bz2
gentoo-2-cd71735892ff0e685fb618c0277a6fb57c02b9e8.zip
Add discover and discover-data ebuilds (hardware detection needed by
livecd)
Diffstat (limited to 'sys-apps/discover')
-rw-r--r--sys-apps/discover/ChangeLog5
-rw-r--r--sys-apps/discover/discover-1.5-r1.ebuild53
-rw-r--r--sys-apps/discover/discover-1.5.ebuild50
-rw-r--r--sys-apps/discover/files/digest-discover-1.52
-rw-r--r--sys-apps/discover/files/digest-discover-1.5-r11
-rw-r--r--sys-apps/discover/files/etc-init.d-discover174
6 files changed, 285 insertions, 0 deletions
diff --git a/sys-apps/discover/ChangeLog b/sys-apps/discover/ChangeLog
new file mode 100644
index 000000000000..db2f12e309c3
--- /dev/null
+++ b/sys-apps/discover/ChangeLog
@@ -0,0 +1,5 @@
+
+discover-1.5-r1.ebuild July 30, 2002 christoph@gentoo.org
+
+ First release into gentoo cvs tree
+ \ No newline at end of file
diff --git a/sys-apps/discover/discover-1.5-r1.ebuild b/sys-apps/discover/discover-1.5-r1.ebuild
new file mode 100644
index 000000000000..6ae540c86443
--- /dev/null
+++ b/sys-apps/discover/discover-1.5-r1.ebuild
@@ -0,0 +1,53 @@
+#
+# (C) 2002 The TelemetryBox Corporation. http://telemetrybox.biz
+# Christoph Lameter, <christoph@lameter.com>, July 15, 2002
+#
+# Released under the GPL
+#
+# -r1 provide gentoo discover script. Create missing /var/lib/discover
+# directory
+DESCRIPTION="Discover hardware and load the appropriate drivers for that hardware."
+
+LONGDESC="
+ Discover is a hardware identification system based on the libdiscover1
+ library. Discover provides a flexible interface that programs can use to
+ report a wide range of information about the hardware that is installed on a
+ Linux system. In addition to reporting information, discover includes
+ support for doing hardware detection at boot time. Detection occurs in two
+ stages: The first stage, which runs from an initial ramdisk (initrd), loads
+ just the drivers needed to mount the root file system, and the second stage
+ loads the rest (ethernet cards, sound cards, etc.)."
+
+HOMEPAGE="http://www.progeny.com/discover"
+
+SRC_URI="ftp://ftp.debian.org/debian/pool/main/d/discover/discover_1.5-1.tar.gz"
+
+LICENSE="GPL"
+SLOT="1"
+KEYWORDS="x86 ppc"
+
+DEPEND="bash"
+
+# Run-time dependencies, same as DEPEND if RDEPEND isn't defined:
+RDEPEND="home/discover-data"
+
+S=${WORKDIR}/${P}
+
+src_compile() {
+ ./configure --prefix=/usr \
+ --sbindir=/sbin \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info || die "configure failed"
+ emake || die
+}
+
+src_install () {
+ make DESTDIR=${D} install || die
+ cp ${FILESDIR}/etc-init.d-discover ${D}/etc/init.d/discover
+ insinto /usr/share/discover
+ doins discover/linuxrc
+ dodoc BUGS AUTHORS ChangeLog NEWS README TODO ChangeLog.mandrake docs/ISA-Structure docs/PCI-Structure docs/Programming
+ insinto /var/lib/discover
+ prepallman
+}
diff --git a/sys-apps/discover/discover-1.5.ebuild b/sys-apps/discover/discover-1.5.ebuild
new file mode 100644
index 000000000000..4087a066b0b2
--- /dev/null
+++ b/sys-apps/discover/discover-1.5.ebuild
@@ -0,0 +1,50 @@
+#
+# (C) 2002 The TelemetryBox Corporation. http://telemetrybox.biz
+# Christoph Lameter, <christoph@lameter.com>, July 15, 2002
+#
+# Released under the GPL
+#
+DESCRIPTION="Discover hardware and load the appropriate drivers for that hardware."
+
+LONGDESC="
+ Discover is a hardware identification system based on the libdiscover1
+ library. Discover provides a flexible interface that programs can use to
+ report a wide range of information about the hardware that is installed on a
+ Linux system. In addition to reporting information, discover includes
+ support for doing hardware detection at boot time. Detection occurs in two
+ stages: The first stage, which runs from an initial ramdisk (initrd), loads
+ just the drivers needed to mount the root file system, and the second stage
+ loads the rest (ethernet cards, sound cards, etc.)."
+
+HOMEPAGE="http://www.progeny.com/discover"
+
+SRC_URI="ftp://ftp.debian.org/debian/pool/main/d/discover/discover_1.5-1.tar.gz"
+
+LICENSE="GPL"
+SLOT="1"
+KEYWORDS="x86 ppc"
+
+DEPEND="bash"
+
+# Run-time dependencies, same as DEPEND if RDEPEND isn't defined:
+RDEPEND="home/discover-data"
+
+S=${WORKDIR}/${P}
+
+src_compile() {
+ ./configure --prefix=/usr \
+ --sbindir=/sbin \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info || die "configure failed"
+ emake || die
+}
+
+src_install () {
+ make DESTDIR=${D} install || die
+ mv ${D}/etc/init.d/discover.init ${D}/etc/init.d/discover
+ insinto /usr/share/discover
+ doins discover/linuxrc
+ dodoc BUGS AUTHORS ChangeLog NEWS README TODO ChangeLog.mandrake docs/ISA-Structure docs/PCI-Structure docs/Programming
+ prepallman
+}
diff --git a/sys-apps/discover/files/digest-discover-1.5 b/sys-apps/discover/files/digest-discover-1.5
new file mode 100644
index 000000000000..9f19c739f31e
--- /dev/null
+++ b/sys-apps/discover/files/digest-discover-1.5
@@ -0,0 +1,2 @@
+MD5 0dd025df0f3c7f2c05e4f6f7596e636b discover_1.5-1.tar.gz 382861
+MD5 f8f284bc6bdc416b529d7429615f965e discover-data_1.2002.05.23-1.tar.gz 62138
diff --git a/sys-apps/discover/files/digest-discover-1.5-r1 b/sys-apps/discover/files/digest-discover-1.5-r1
new file mode 100644
index 000000000000..ef9f5f0ac315
--- /dev/null
+++ b/sys-apps/discover/files/digest-discover-1.5-r1
@@ -0,0 +1 @@
+MD5 0dd025df0f3c7f2c05e4f6f7596e636b discover_1.5-1.tar.gz 382861
diff --git a/sys-apps/discover/files/etc-init.d-discover b/sys-apps/discover/files/etc-init.d-discover
new file mode 100644
index 000000000000..3bb796120478
--- /dev/null
+++ b/sys-apps/discover/files/etc-init.d-discover
@@ -0,0 +1,174 @@
+#!/sbin/runscript
+# Copyright 2002 TelemetryBox Corporation
+# Distributed under the GPL
+
+depend() {
+ before net.eth0
+ before gpm
+}
+
+stop() {
+ eend 0
+}
+
+skip ()
+{
+ # Check if it's configured to be skipped first.
+ if [ -f $CONFFILE ]
+ then
+ if [ -f $SKIPFILE ]
+ then
+ CONFCMD="cat $CONFFILE $SKIPFILE"
+ else
+ CONFCMD="cat $CONFFILE"
+ fi
+ for M in $($CONFCMD | \
+ sed "s/#.*$//" | \
+ awk '{ if ($1 == "skip") print $2 }')
+ do
+ if [ "$M" = "$1" ]
+ then
+ return 0
+ fi
+ done
+ fi
+
+ # We passed all tests; don't skip it.
+ return 1;
+}
+
+
+start() {
+
+ # file that determines the discover program's default behavior
+ CONFFILE=/etc/discover.conf
+ # list of modules for which to skip loading attempts
+ SKIPFILE=/etc/discover-autoskip.conf
+ # file that controls this init script's management of device symlinks
+ INITFILE=/etc/default/discover
+
+ # Load init script parameters.
+ if [ -r $INITFILE ]; then
+ . $INITFILE
+ fi
+
+ [ -f $CONFFILE ] || return 1
+
+ ARGUMENTS=$(sed "s/#.*$//" $CONFFILE | grep "^boot " | cut -c6-)
+ # Deal with pre-0.9.7 syntax:
+ ARGUMENTS=$(echo $ARGUMENTS | sed "s/,/ /g")
+
+
+ # Detect hardware:
+ ebegin "Detecting hardware: "
+ MODULES=$(discover --module $ARGUMENTS | sort -u)
+ echo $MODULES >&2
+
+ if [ -f /var/lib/discover/crash ]
+ then
+ # The system crashed trying to load a module during the last boot
+ # cycle, so add an appropriate "skip" line to the skip file:
+ echo "skip $(cat /var/lib/discover/crash)" >> $SKIPFILE
+ rm -f /var/lib/discover/crash
+ sync
+ fi
+
+ # Load the appropriate modules:
+ for MODULE in $MODULES
+ do
+ # See if we should skip $MODULE:
+ if [ "$MODULE" = "ignore" -o "$MODULE" = "unknown" ]
+ then
+ continue
+ fi
+
+ if skip $MODULE
+ then
+ echo "Skipping $MODULE module; edit $CONFFILE and/or"
+ echo "$SKIPFILE to re-enable it." >&2
+ continue
+ fi
+
+ if expr "$MODULE" : "Server:.*" > /dev/null 2>&1
+ then
+ # silently skip X server "modules"
+ continue
+ fi
+
+ if ! (modprobe -l ${MODULE}.o | grep ${MODULE}.o) > /dev/null
+ then
+ echo "Skipping $MODULE module; assuming it is compiled into the kernel." >&2
+ continue
+ fi
+
+ echo "Loading $MODULE module." >&2
+
+ # Note the module being loaded in /var/lib/discover/crash. If loading
+ # the module crashes the machine, this file will exist at the next
+ # boot, and we'll add an appropriate "skip" line to the conffile so we
+ # don't try to load it again.
+ echo $MODULE > /var/lib/discover/crash
+ sync
+
+ modprobe $MODULE
+
+ # The module loaded without incident, so we can safely remove the crash
+ # file.
+ rm -f /var/lib/discover/crash
+ sync
+ done
+
+ if [ "$MANAGE_CDROM_DEVICES" = "true" ]; then
+ # Remove all old optical drive mount points:
+ for CDMOUNT in /cdrom?
+ do
+ rm -rf $CDMOUNT
+ done
+
+ # Link /dev/cdromX to all detected CD/DVD drives, and create mount points:
+ CDNUM=0
+ for CDROM in $(discover --device cdrom)
+ do
+ if [ ! -e $CDROM ]
+ then
+ echo -n "discover reports that $CDROM is a CD/DVD device, but it " >&2
+ echo "does not exist. Not updating /dev/cdrom$CDNUM." >&2
+ elif [ ! -b $CDROM ]
+ then
+ echo -n "discover reports that $CDROM is a CD/DVD device, but it " >&2
+ echo "is not a block device. Not updating /dev/cdrom$CDNUM." >&2
+ elif [ -e /dev/cdrom$CDNUM -a ! -L /dev/cdrom$CDNUM ]
+ then
+ echo -n "/dev/cdrom$CDNUM exists and is not a symlink. Not updating " >&2
+ echo "/dev/cdrom$CDNUM." >&2
+ CDNUM=$(( $CDNUM + 1 ))
+ else
+ ln -fs $CDROM /dev/cdrom$CDNUM
+ mkdir -p $CDROM_BASE_MOUNTPOINT/cdrom$CDNUM
+ CDNUM=$(( $CDNUM + 1 ))
+ fi
+ done
+
+ # Link /dev/cdrom to the appropriate device:
+ if [ -e /dev/cdrom0 ]
+ then
+ if [ -L /dev/cdrom -o ! -e /dev/cdrom ]
+ then
+ ln -fs /dev/cdrom0 /dev/cdrom
+ # link the mountpoint only if nothing is mounted there
+ if ! awk '{print $2}' < /proc/mounts | grep -qs "$CDROM_BASE_MOUNTPOINT/cdrom"
+ then
+ ln -fs $CDROM_BASE_MOUNTPOINT/cdrom0 $CDROM_BASE_MOUNTPOINT/cdrom
+ else
+ echo "Cannot create link from $CDROM_BASE_MOUNTPOINT/cdrom to $CDROM_BASE_MOUNTPOINT/cdrom0," >&2
+ echo "because a filesystem is already mounted at $CDROM_BASE_MOUNTPOINT/cdrom." >&2
+ fi
+ else
+ echo "/dev/cdrom exists and is not a symlink. Not updating /dev/cdrom." >&2
+ fi
+ else
+ echo "No CD/DVD drives found." >&2
+ fi
+ fi
+ eend 0
+}