mirror of
https://github.com/pentoo/pentoo-overlay
synced 2026-01-30 12:02:57 +01:00
hwsetup fork, fu, gone.
This commit is contained in:
parent
58057c45a6
commit
9bfb2d080a
5 changed files with 0 additions and 226 deletions
|
|
@ -1,5 +0,0 @@
|
|||
AUX 1.2-3-fastprobe.patch 2817 RMD160 5cadca96d654739d61db18287bf2a71f4d7a00ca SHA1 9d05f2542f4fc9b8ae4ace559bec8a9720ea77b5 SHA256 9a16e4ddaada2bc115a48a6d60b5cac72d49f33c7eecf245f6337df627a4a0d0
|
||||
AUX 1.2-7-dyn_blacklist.patch 1996 RMD160 e299ee153e13f9a80d7a28209cf62268dfb9e8bd SHA1 192ea0961e02a1a84b6efc98a02b360d859d4ca1 SHA256 625c60827eea5f17b5d833276cf7924223e6ab1fa681f8518c4e8e1070465339
|
||||
AUX 1.2-7-gentoo.patch 726 RMD160 4fee01b484f303d5a5b36099f72e18e31e165ca5 SHA1 bc793c3c496010db48f5b9ba6e6e6ae90c813676 SHA256 bd244624e9fc761c7c72ecd98a7aa4133e2d4858172ba336f5bc9596a67c8f51
|
||||
DIST hwsetup_1.2-7.tar.gz 10706 RMD160 7895b32c81254b2ca1575ab12dcc6fa39d011e17 SHA1 c91cb22c07755ecbfce8e9e6826e8e2580f103f8 SHA256 aa72b37ce306b5191cabd31eb5f19ab2a5e635697a263c6735d10c7bf99f9589
|
||||
EBUILD hwsetup-1.2-r2.ebuild 1920 RMD160 49d96cb923517a764ac1f07f8fa204e8d23611d6 SHA1 62f6b9ba9d3d15f57eeedcb0ffa9849a05db5fc6 SHA256 dffdc3a310ab6fe7cfcd4aa05f8effbcb4df520173fc278e2d4b88c00824cd62
|
||||
|
|
@ -1,75 +0,0 @@
|
|||
diff -urN hwsetup-1.2.dyn_blacklist/hwsetup.c hwsetup-1.2/hwsetup.c
|
||||
--- hwsetup-1.2.dyn_blacklist/hwsetup.c 2005-11-17 14:20:14.000000000 -0500
|
||||
+++ hwsetup-1.2/hwsetup.c 2005-11-17 14:24:54.000000000 -0500
|
||||
@@ -140,14 +140,15 @@
|
||||
|
||||
int syntax(char *option)
|
||||
{
|
||||
- printf(VERSION);
|
||||
+ puts(VERSION);
|
||||
if(option) fprintf(stderr,"hwsetup: Unknown option '%s'\n\n",option);
|
||||
- printf("Usage: hwsetup\n"
|
||||
- " -v be verbose\n"
|
||||
- " -p print rotating prompt\n"
|
||||
- " -a ignore audio devices\n"
|
||||
- " -s ignore scsi controllers\n"
|
||||
- " -n probe only, don't configure anything.\n");
|
||||
+ puts("Usage: hwsetup\n"
|
||||
+ "\t\t-v\tbe verbose\n"
|
||||
+ "\t\t-p\tprint rotating prompt\n"
|
||||
+ "\t\t-a\tignore audio devices\n"
|
||||
+ "\t\t-s\tignore scsi controllers\n"
|
||||
+ "\t\t-n\tprobe only, don't configure anything.\n"
|
||||
+ "\t\t-f\trun a fast probe.");
|
||||
return option?1:0;
|
||||
}
|
||||
|
||||
@@ -425,7 +426,7 @@
|
||||
{
|
||||
signal(SIGALRM,SIG_IGN);
|
||||
fprintf(stderr,"\nWARNING: Autodetection seems to hang,\n"
|
||||
- "please check your computers BIOS settings.\n");
|
||||
+ "please check your computer's BIOS settings.\n");
|
||||
fflush(stderr);
|
||||
if(wpid) { kill(wpid,SIGTERM); usleep(2500000); kill(wpid,SIGKILL); wpid=0; }
|
||||
exit(1); /* exit program */
|
||||
@@ -591,12 +592,13 @@
|
||||
return 0;
|
||||
}
|
||||
|
||||
-int hw_setup(enum deviceClass dc, int verbose, int probeonly, int skip)
|
||||
+int hw_setup(enum deviceClass dc, int verbose, int probeonly, int skip, int fastprobe)
|
||||
{
|
||||
int i,mouse=0,cdrom=0,modem=0,scanner=0;
|
||||
+ int probeopt=fastprobe?PROBE_SAFE:PROBE_ALL;
|
||||
struct device **currentDevs, *d, *serialmouse=NULL, *usbmouse=NULL;
|
||||
if(verbose&VERBOSE_PROMPT) wpid=startwheel();
|
||||
- currentDevs=probeDevices(dc,BUS_UNSPEC,PROBE_ALL);
|
||||
+ currentDevs=probeDevices(dc,BUS_UNSPEC,probeopt);
|
||||
if(verbose&VERBOSE_PROMPT&&wpid>0) { kill(wpid,SIGTERM); wpid=0; usleep(160000); write(2,"\033[0m Done.\n",11); }
|
||||
if(currentDevs==NULL) return -1;
|
||||
check_proc_modules(); /* Get currently loaded module list */
|
||||
@@ -650,7 +652,7 @@
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
- int i, verbose=0, probeonly=0, skip=0;
|
||||
+ int i, verbose=0, probeonly=0, skip=0, fast=0;
|
||||
enum deviceClass dc=CLASS_UNSPEC;
|
||||
for(i=1;i<argc;i++)
|
||||
{
|
||||
@@ -659,6 +661,7 @@
|
||||
else if(!strcasecmp(argv[i],"-a")) skip|=SKIP_AUDIO;
|
||||
else if(!strcasecmp(argv[i],"-s")) skip|=SKIP_SCSI;
|
||||
else if(!strcasecmp(argv[i],"-n")) probeonly=1;
|
||||
+ else if(!strcasecmp(argv[i],"-f")) fast=1;
|
||||
else return syntax(argv[i]);
|
||||
}
|
||||
/* Allow SIGTERM, SIGINT: rmmod depends on this. */
|
||||
@@ -667,5 +670,5 @@
|
||||
#ifdef BLACKLIST
|
||||
gen_blacklist();
|
||||
#endif
|
||||
- return hw_setup(dc,verbose,probeonly,skip);
|
||||
+ return hw_setup(dc,verbose,probeonly,skip,fast);
|
||||
}
|
||||
|
|
@ -1,63 +0,0 @@
|
|||
diff -urN hwsetup-1.2.orig/hwsetup.c hwsetup-1.2/hwsetup.c
|
||||
--- hwsetup-1.2.orig/hwsetup.c 2008-04-07 18:32:34.000000000 -0700
|
||||
+++ hwsetup-1.2/hwsetup.c 2008-04-07 18:49:20.000000000 -0700
|
||||
@@ -51,13 +51,40 @@
|
||||
/* Do not, under any circumstances, load these modules automatically, */
|
||||
/* even if in pcitable. (libkudzu may ignore this, and the KNOPPIX */
|
||||
/* autoconfig scripts may probe them, too) */
|
||||
-char *blacklist[] =
|
||||
+char *blacklist[200][200] =
|
||||
{ "apm","agpgart","yenta_socket","i82092","i82365","tcic",
|
||||
"pcmcia_core","ds","ohci1394","hisax", "hisax_fcpcipnp",
|
||||
"hisax_isac","hisax_st5481",
|
||||
/* Winmodems, unusable, can block sound slot */
|
||||
"snd-atiixp-modem", "snd-intel8x0m","snd-via82xx-modem"
|
||||
};
|
||||
+
|
||||
+int blacklistsize = 13;
|
||||
+void gen_blacklist(){
|
||||
+ int n = 13;
|
||||
+ int size = 0;
|
||||
+ char *comment;
|
||||
+ char module[1024];
|
||||
+ FILE *stream;
|
||||
+
|
||||
+ if((stream = fopen ("/usr/share/hwdata/blacklist", "r")) != (FILE *)0) {
|
||||
+ while((fgets(module, 1023, stream)) != (char *)0 ) {
|
||||
+
|
||||
+ comment = strchr(module, '#');
|
||||
+ if (comment != 0) *comment = '\0';
|
||||
+ comment = strchr(module, '\n');
|
||||
+ if (comment != 0) *comment = '\0';
|
||||
+ size = strlen(module);
|
||||
+ if (size < 2) continue;
|
||||
+ strcat (module , " \0");
|
||||
+ strcpy(blacklist[n] , module);
|
||||
+ n++;
|
||||
+ if ( n == 200 ) break;
|
||||
+ //printf(module);
|
||||
+ }
|
||||
+ blacklistsize = n;
|
||||
+ }
|
||||
+}
|
||||
#endif
|
||||
|
||||
/* If a conflicting module in a row is already loaded, the new module will not be probed anymore */
|
||||
@@ -547,7 +574,7 @@
|
||||
char *cc;
|
||||
if((m==NULL)||(!strcmp("unknown",m))||(!strcmp("ignore",m))|| check_loaded(m)) return 0;
|
||||
#ifdef BLACKLIST
|
||||
- for(i=0;i<(sizeof(blacklist)/sizeof(char*));i++)
|
||||
+ for(i=0;i<blacklistsize;i++)
|
||||
{
|
||||
if(!modcmp(blacklist[i],m))
|
||||
{
|
||||
@@ -781,5 +808,8 @@
|
||||
/* Allow SIGTERM, SIGINT: rmmod depends on this. */
|
||||
signal(SIGTERM,SIG_DFL); signal(SIGINT,SIG_DFL);
|
||||
signal(SIGALRM,alarm_handler); alarm(MAX_TIME);
|
||||
+#ifdef BLACKLIST
|
||||
+ gen_blacklist();
|
||||
+#endif
|
||||
return hw_setup(dc,verbose,probeonly,skip);
|
||||
}
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
diff -urN hwsetup-1.2.fastprobe/hwsetup.c hwsetup-1.2/hwsetup.c
|
||||
--- hwsetup-1.2.fastprobe/hwsetup.c 2008-04-07 19:09:08.000000000 -0700
|
||||
+++ hwsetup-1.2/hwsetup.c 2008-04-07 19:07:55.000000000 -0700
|
||||
@@ -388,7 +388,7 @@
|
||||
sprintf(fullpath,"%.90s%.32s",xpath,server[i]);
|
||||
if(!exists(fullpath)) continue;
|
||||
strncpy(xi.xserver,server[i],sizeof(xi.xserver));
|
||||
- }
|
||||
+ }
|
||||
}
|
||||
}
|
||||
if((xpos=strstr(d->driver,xorg))!=NULL) /* Check for Xorg */
|
||||
@@ -653,7 +653,7 @@
|
||||
int writeconfig(char *name,struct device *d,int verbose)
|
||||
{
|
||||
FILE *f,*k;
|
||||
- const char *kconfig="/etc/sysconfig/knoppix";
|
||||
+ const char *kconfig="/etc/sysconfig/gentoo";
|
||||
char *desc;
|
||||
unlink(name);
|
||||
if((f=fopen(name,"w"))==NULL)
|
||||
|
|
@ -1,62 +0,0 @@
|
|||
# Copyright 1999-2008 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-apps/hwsetup/hwsetup-1.2-r1.ebuild,v 1.3 2008/10/14 09:30:11 robbat2 Exp $
|
||||
|
||||
inherit eutils toolchain-funcs flag-o-matic
|
||||
|
||||
MY_PV=${PV}-7
|
||||
DESCRIPTION="Hardware setup program from Knoppix - used only on LiveCD"
|
||||
HOMEPAGE="http://www.knopper.net/"
|
||||
SRC_URI="http://debian-knoppix.alioth.debian.org/sources/${PN}_${MY_PV}.tar.gz"
|
||||
#http://developer.linuxtag.net/knoppix/sources/${PN}_${MY_PV}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="-*"
|
||||
IUSE="zlib"
|
||||
|
||||
COMMON_DEPEND="zlib? ( sys-libs/zlib )
|
||||
sys-apps/pciutils"
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
sys-libs/libkudzu"
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
sys-apps/hwdata-redhat"
|
||||
|
||||
pkg_setup() {
|
||||
ewarn "This package is designed for use on the LiveCD only and will do "
|
||||
ewarn "unspeakably horrible and unexpected things on a normal system."
|
||||
ewarn "YOU HAVE BEEN WARNED!!!"
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
unpack ${A}
|
||||
epatch \
|
||||
"${FILESDIR}"/${MY_PV}-dyn_blacklist.patch \
|
||||
"${FILESDIR}"/${PV}-3-fastprobe.patch \
|
||||
"${FILESDIR}"/${MY_PV}-gentoo.patch
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
append-ldflags -s
|
||||
filter-ldflags -Wl,--as-needed --as-needed
|
||||
if use zlib ; then
|
||||
sed -i \
|
||||
-e '/^LIBS=/s,-lpci,-lz -lpci,g' \
|
||||
Makefile
|
||||
elif built_with_use --missing false sys-apps/pciutils zlib ; then
|
||||
die "You need to build with USE=zlib to match sys-apps/pcituils"
|
||||
fi
|
||||
emake LDFLAGS="${LDFLAGS}" OPT="${CFLAGS}" CC="$(tc-getCC)" || die "emake failed"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
einstall DESTDIR="${D}" PREFIX=/usr MANDIR=/usr/share/man || die "Install failed"
|
||||
keepdir /etc/sysconfig
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
ewarn "This package is intended for usage on the Gentoo release media. If"
|
||||
ewarn "you are not building a CD, remove this package. It will not work"
|
||||
ewarn "properly on a running system, as Gentoo does not use any of the"
|
||||
ewarn "Knoppix-style detection except for CD builds."
|
||||
}
|
||||
Loading…
Reference in a new issue