diff --git a/package/base/devfsd/devfsd.conf.data b/package/base/devfsd/devfsd.conf.data index 35f917e6b..43620238c 100644 --- a/package/base/devfsd/devfsd.conf.data +++ b/package/base/devfsd/devfsd.conf.data @@ -22,9 +22,7 @@ # # man 8 devfsd # -# The argument of the REGISTER directive is a regular expression where the -# argument of LOOKUP seems to be a normal UNIX-wildcard. So you need a dot in -# "REGISTER xyz/.*" to NOT change the xyz directory's permission! +# The arguments of the directives are regular expression. # enable old compatibility links ... # REGISTER .* MKOLDCOMPAT diff --git a/package/base/devfsd/linux-2.6.patch b/package/base/devfsd/linux-2.6.patch new file mode 100644 index 000000000..26ffc7621 --- /dev/null +++ b/package/base/devfsd/linux-2.6.patch @@ -0,0 +1,96 @@ +--- devfsd/check_kernel.c.kernel25 2003-06-02 22:17:21.000000000 +0400 ++++ devfsd/check_kernel.c 2003-06-02 22:17:43.000000000 +0400 +@@ -0,0 +1,30 @@ ++#include ++#include ++#include ++#include ++#include ++ ++extern char *modules_devfs; ++ ++/* copied over from module-init-tools backward_compat.c */ ++#ifndef __ia64 /* breaks ia64. */ ++static _syscall2(long, create_module, const char *, name, size_t, size); ++#else ++#define create_module(name, size) \ ++ syscall(__NR_create_module, (name), (size)) ++#endif ++ ++void check_kernel_version (int verbose) ++{ ++ int k26 = 1; ++ ++ errno = 0; ++ if (create_module(NULL, 0) >= 0 | errno != ENOSYS) { ++ modules_devfs = "/etc/modules.devfs"; ++ k26 = 0; ++ } ++ ++ if (verbose) ++ fprintf (stderr, "devfsd: kernel %s detected, using %s for MODLOAD\n", ++ k26 ? "2.6" : "2.4", modules_devfs); ++} +--- devfsd/devfsd.c.kernel25 2003-06-02 22:17:21.000000000 +0400 ++++ devfsd/devfsd.c 2003-06-02 22:17:21.000000000 +0400 +@@ -396,10 +396,14 @@ EXTERN_FUNCTION (flag st_expr_expand, + EXTERN_FUNCTION (const char *get_old_name, + (const char *devname, unsigned int namelen, + char *buffer, unsigned int major, unsigned int minor) ); +- ++EXTERN_FUNCTION (void check_kernel_version, ++ (int) ); + + /* Public data */ + flag syslog_is_open = FALSE; ++/* set to new style, runtime test might override it later */ ++char *modules_devfs = "/etc/modprobe.devfs"; ++ + + + /* Public functions */ +@@ -508,7 +512,6 @@ static struct event_type + {0xffffffff, NULL, NULL} + }; + +- + /* Public functions follow */ + + int main (int argc, char **argv) +@@ -652,6 +655,7 @@ int main (int argc, char **argv) + /* Set umask so that mknod(2), open(2) and mkdir(2) have complete control + over permissions */ + umask (0); ++ check_kernel_version (trace_level); + read_config (CONFIG_FILE, FALSE, &event_mask); + /* Do the scan before forking, so that boot scripts see the finished + product */ +@@ -1243,7 +1247,7 @@ static void action_modload (const struct + argv[0] = "/sbin/modprobe"; + argv[1] = "-k"; + argv[2] = "-C"; +- argv[3] = "/etc/modules.devfs"; ++ argv[3] = modules_devfs; + argv[4] = device; + argv[5] = NULL; + snprintf (device, sizeof (device), "/dev/%s", info->devname); +--- devfsd/GNUmakefile.kernel25 2002-02-19 09:06:43.000000000 +0300 ++++ devfsd/GNUmakefile 2003-06-02 22:17:21.000000000 +0400 +@@ -18,13 +18,16 @@ endif + all: devfsd rpm.spec + + +-OBJECTS = devfsd.o expression.o compat_name.o ++OBJECTS = devfsd.o expression.o compat_name.o check_kernel.o + + CFLAGS = -O2 -I. -I$(KERNEL_DIR)/include -Wall $(CEXTRAS) $(DEFINES) + + devfsd: $(OBJECTS) + $(CC) -O2 -o devfsd $(OBJECTS) $(LDFLAGS) -export-dynamic -ldl + ++check_kernel.o: check_kernel.c ++ $(CC) -O2 -c $< ++ + install: devfsd + @if fgrep -q "Generic section: do not change" /etc/modules.conf ; then\ + echo "First remove the generic devfs entries from /etc/modules.conf"; exit 1; \ diff --git a/package/base/module-init-tools/modprobe.conf.data b/package/base/module-init-tools/modprobe.conf.data new file mode 100644 index 000000000..f871f42c7 --- /dev/null +++ b/package/base/module-init-tools/modprobe.conf.data @@ -0,0 +1,225 @@ +# +# --- ROCK-COPYRIGHT-NOTE-BEGIN --- +# +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# Please add additional copyright information _after_ the line containing +# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by +# the ./scripts/Create-CopyPatch script. Do not edit this copyright text! +# +# ROCK Linux: rock-src/package/base/modutils/modules.conf.data +# ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. A copy of the GNU General Public +# License can be found at Documentation/COPYING. +# +# Many people helped and are helping developing ROCK Linux. Please +# have a look at http://www.rocklinux.org/ and the Documentation/TEAM +# file for details. +# +# --- ROCK-COPYRIGHT-NOTE-END --- +# +# See 'man 5 modprobe.conf' for details. + +# Host specific aliases + +alias eth0 your-card # 3c59x, sis900, ne ... +alias scsi-hosts ide-scsi # aic7xxx, sym53c8xx + +#alias parport_lowlevel parport_pc +#options parport_pc io=0x378 irq=auto + +#alias /dev/usb/lp0 printer + +alias /dev/snd snd-card-0 snd-card-1 +alias /dev/snd/* /dev/snd +alias /dev/sound/audio /dev/sound/dsp /dev/sound/mixer sound-slot-0 + +alias sound-slot-0 snd-pcm-oss snd-mixer-oss snd-seq-oss +alias /dev/sound/* sound-slot-0 + +#alias /dev/v4l bttv +#options bttv card=39 tuner=5 + +#alias /dev/input/js0 joydev pcigame analog +#alias lm_sensors i2c-isa w83781d via686a + +#alias snd-card-0 snd-trident +#alias snd-card-1 snd-ice1712 + +# ALSA default setup +alias char-major-116-* snd +alias sound-service-0-0 snd-mixer-oss +alias sound-service-0-1 snd-seq-oss +alias sound-service-0-3 snd-pcm-oss +alias sound-service-0-8 snd-seq-oss +alias sound-service-0-12 snd-pcm-oss +alias sound-service-1-0 snd-mixer-oss +alias sound-service-1-3 snd-pcm-oss +alias sound-service-1-8 snd-seq-oss +alias sound-service-1-12 snd-pcm-oss + +# Generic aliases +alias /dev/loop loop +alias ppp ppp_generic + +alias binfmt-204 binfmt_aout +alias binfmt-263 binfmt_aout +alias binfmt-264 binfmt_aout +alias binfmt-267 binfmt_aout +alias binfmt-387 binfmt_aout +alias binfmt-332 iBCS +alias binfmt--310 binfmt_java +alias block-major-1-* rd +alias block-major-2-* floppy +alias block-major-3-* ide-probe-mod +alias block-major-7-* loop +alias block-major-8-* sd_mod +alias block-major-9-* md +alias block-major-11-* sr_mod +alias block-major-13-* xd +alias block-major-15-* cdu31a +alias block-major-16-* gscd +alias block-major-17-* optcd +alias block-major-18-* sjcd +alias block-major-20-* mcdx +alias block-major-22-* ide-probe-mod +alias block-major-23-* mcd +alias block-major-24-* sonycd535 +alias block-major-25-* sbpcd +alias block-major-26-* sbpcd +alias block-major-27-* sbpcd +alias block-major-29-* aztcd +alias block-major-32-* cm206 +alias block-major-33-* ide-probe-mod +alias block-major-34-* ide-probe-mod +alias block-major-37-* ide-tape +alias block-major-44-* ftl +alias block-major-46-* pcd +alias block-major-47-* pf +alias block-major-56-* ide-probe-mod +alias block-major-57-* ide-probe-mod +alias block-major-58-* lvm-mod +alias block-major-88-* ide-probe-mod +alias block-major-89-* ide-probe-mod +alias block-major-90-* ide-probe-mod +alias block-major-91-* ide-probe-mod +alias block-major-93-* nftl +alias block-major-97-* pg +alias block-major-113-* viocd +alias char-major-4-* serial +alias char-major-5-* serial +alias char-major-6-* lp +alias char-major-9-* st +alias char-major-10-0 busmouse +alias char-major-10-2 msbusmouse +alias char-major-10-3 atixlmouse +alias char-major-10-130 wdt +alias char-major-10-131 wdt +alias char-major-10-139 openprom +alias char-major-10-144 nvram +alias char-major-10-157 applicom +alias char-major-10-175 agpgart +alias char-major-10-184 microcode +alias char-major-10-200 tun +alias char-major-10-250 hci_vhci +alias char-major-13-* analog +alias char-major-13-0 joydev +alias char-major-13-32 mousedev +alias char-major-14-* soundcore +alias char-major-19-* cyclades +alias char-major-20-* cyclades +alias char-major-21-* sg +alias char-major-22-* pcxx +alias char-major-23-* pcxx +alias char-major-27-* ftape +alias char-major-34-* scc +alias char-major-35-* tclmidi +alias char-major-36-* netlink +alias char-major-37-* ide-tape +alias char-major-48-* riscom8 +alias char-major-49-* riscom8 +alias char-major-57-* esp +alias char-major-58-* esp +alias char-major-63-* kdebug +alias char-major-90-* mtdchar +alias char-major-96-* pt +alias char-major-99-* ppdev +alias char-major-107-* 3dfx +alias char-major-108-* ppp_generic +alias char-major-109-* lvm-mod +alias char-major-161-* ircomm-tty +alias char-major-171-* raw1394 +alias char-major-195-* NVdriver +alias char-major-200-* vxspec +alias char-major-206-* osst +alias char-major-216-* rfcomm +alias dos msdos +alias dummy0 dummy +alias dummy1 dummy +alias eth0 your-card +alias iso9660 isofs +alias md-personality-1 linear +alias md-personality-2 raid0 +alias md-personality-3 raid1 +alias md-personality-4 raid5 +alias md-personality-7 multipath +alias net-pf-1 unix +alias net-pf-2 ipv4 +alias net-pf-4 ipx +alias net-pf-5 appletalk +alias net-pf-10 ipv6 +alias net-pf-15 af_key +alias net-pf-17 af_packet +alias net-pf-31 bluez +alias netalias-2 ip_alias +alias irlan0 irlan +alias irda-dongle-0 tekram +alias irda-dongle-1 esi +alias irda-dongle-2 actisys +alias irda-dongle-3 actisys +alias irda-dongle-4 girbil +alias irda-dongle-5 litelink +alias irda-dongle-6 airport +alias irda-dongle-7 old_belkin +alias bt-proto-0 l2cap +alias bt-proto-2 sco +alias bt-proto-3 rfcomm +alias bt-proto-4 bnep +alias plip0 plip +alias plip1 plip +alias tunl0 ipip +alias cipcb0 cipcb +alias cipcb1 cipcb +alias cipcb2 cipcb +alias cipcb3 cipcb +alias ppp0 ppp_generic +alias ppp1 ppp_generic +alias slip0 slip +alias slip1 slip +alias tty-ldisc-1 slip +alias tty-ldisc-3 ppp_async +alias tty-ldisc-11 irtty +alias tty-ldisc-14 ppp_synctty +alias tty-ldisc-15 hci_uart +alias ppp-compress-18 ppp_mppe +alias ppp-compress-21 bsd_comp +alias ppp-compress-24 ppp_deflate +alias ppp-compress-26 ppp_deflate +alias parport_lowlevel parport_pc +alias usbdevfs usbcore +alias xfrm-type-2-50 esp4 +alias xfrm-type-2-51 ah4 +alias xfrm-type-2-108 ipcomp +alias xfrm-type-10-50 esp6 +alias xfrm-type-10-51 ah6 +alias xfrm-type-10-108 ipcomp6 +alias cipher_null crypto_null +alias digest_null crypto_null +alias compress_null crypto_null +alias sha384 sha512 +alias char-major-89-* i2c-dev +alias net-pf-24 pppoe + diff --git a/package/base/module-init-tools/module-init-tools.conf b/package/base/module-init-tools/module-init-tools.conf index 4413c571f..e02fcdabe 100644 --- a/package/base/module-init-tools/module-init-tools.conf +++ b/package/base/module-init-tools/module-init-tools.conf @@ -22,5 +22,13 @@ confopt="$confopt --sbindir=\$root/sbin" export CFLAGS="$CFLAGS -I$root/usr/src/linux/include" -postmake="ln -fvs ..\$bindir/lsmod \$root/sbin/lsmod" + +mit_pm() { + ln -fvs ..$bindir/lsmod $root/sbin/lsmod + + cp -vf $confdir/modprobe.conf.data $root/etc/modprobe.conf + cp -vf ./modprobe.devfs $root/etc/modprobe.devfs +} + +hook_add postmake 5 "mit_pm"