]>
git.ipfire.org Git - ipfire-2.x.git/blob - src/install+setup/install/usb.c
2 * This file is part of the IPCop Firewall.
4 * IPCop is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * IPCop is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with IPCop; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 * Copyright 2002: Mark Wormgoor <mark@wormgoor.com>
28 int initialize_usb() {
29 mysystem("/sbin/modprobe sd_mod");
30 mysystem("/sbin/modprobe sr_mod");
31 mysystem("/sbin/modprobe usb-storage");
34 mysystem("/sbin/rmmod ehci-hcd");
38 mysystem("/sbin/rmmod ohci-hcd");
42 mysystem("/sbin/rmmod uhci-hcd");
46 if (mysystem("/sbin/modprobe ehci-hcd") == 0)
48 if (mysystem("/sbin/modprobe ohci-hcd") == 0)
50 if (mysystem("/sbin/modprobe uhci-hcd") == 0)
53 mysystem("/sbin/modprobe usbhid");
57 int write_usb_modules_conf() {
61 if (!(handle
= fopen("/harddisk/etc/modules.conf", "a")))
66 #if 0 /* we don't do this yet, because one of the drivers has a problem
70 fprintf(handle
,"alias usb-controller%d ehci-hcd\n",index
);
72 fprintf(handle
,"alias usb-controller ehci-hcd\n");
79 fprintf(handle
,"alias usb-controller%d ohci-hcd\n",index
);
81 fprintf(handle
,"alias usb-controller ohci-hcd\n");
87 fprintf(handle
,"alias usb-controller%d uhci-hcd\n",index
);
89 fprintf(handle
,"alias usb-controller uhci-hcd\n");