]>
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>
20 * $Id: usb.c,v 1.9.2.3 2004/11/16 22:48:43 alanh Exp $
30 int initialize_usb() {
31 mysystem("/sbin/modprobe sd_mod");
32 mysystem("/sbin/modprobe sr_mod");
33 mysystem("/sbin/modprobe usb-storage");
36 mysystem("/sbin/rmmod ehci-hcd");
40 mysystem("/sbin/rmmod usb-ohci");
44 mysystem("/sbin/rmmod usb-uhci");
48 if (mysystem("/sbin/modprobe ehci-hcd") == 0)
50 if (mysystem("/sbin/modprobe usb-ohci") == 0)
52 if (mysystem("/sbin/modprobe usb-uhci") == 0)
55 mysystem("/sbin/modprobe hid");
56 mysystem("/sbin/modprobe keybdev");
60 int write_usb_modules_conf() {
64 if (!(handle
= fopen("/harddisk/etc/modules.conf", "a")))
69 #if 0 /* we don't do this yet, because one of the drivers has a problem
73 fprintf(handle
,"alias usb-controller%d ehci-hcd\n",index
);
75 fprintf(handle
,"alias usb-controller ehci-hcd\n");
82 fprintf(handle
,"alias usb-controller%d usb-ohci\n",index
);
84 fprintf(handle
,"alias usb-controller usb-ohci\n");
90 fprintf(handle
,"alias usb-controller%d usb-uhci\n",index
);
92 fprintf(handle
,"alias usb-controller usb-uhci\n");