02-modules.sh 1.14 KB
Newer Older
Your Name's avatar
Your Name committed
1
#!/busybox sh
sulincix's avatar
sulincix committed
2
msg "Loading filesystem drivers"
a's avatar
a committed
3
ls /lib/modules/*/fs/ | sed "s/^/modprobe /g" | sed "s/\.ko//g" | sed "s/$/ &/g" > /fs
sulincix's avatar
sulincix committed
4
sh /fs &>/dev/null
Your Name's avatar
Your Name committed
5
msg "Loading crypto drivers"
a's avatar
a committed
6
ls /lib/modules/*/crypto/ | sed "s/^/modprobe /g" | sed "s/.ko//g" | sed "s/$/ &/g" > /crypto
Your Name's avatar
Your Name committed
7 8 9 10 11 12 13 14 15 16 17 18
sh /crypto &>/dev/null

load_modules(){
  debug "Listing kernel modules"
  cd /lib/modules/*
  find  crypto lib block ata md firewire scsi \
     message pcmcia virtio host storage \
     -type f 2> /dev/null | sed "s/.*\///g" | grep "\.ko" | sed "s/.ko.*/ &/g" | sed "s/^/modprobe /g"> /load_modules.sh
  msg "Trying to load kernel modules"
  sh /load_modules.sh &>/dev/null
}

sulincix's avatar
sulincix committed
19
if [ -x /xbin/udevd -a -x /xbin/udevadm ] && [ "$noudev" != "true" ]; then
Ali Rıza KESKİN's avatar
Ali Rıza KESKİN committed
20
  msg "Triggering udev"
21
  mdev -s
Your Name's avatar
Your Name committed
22
  {
Ali Rıza KESKİN's avatar
Ali Rıza KESKİN committed
23
  /xbin/udevd --daemon
24 25 26 27
  /xbin/udevadm trigger --action=add --type=subsystems
  /xbin/udevadm trigger --action=add --type=devices
  /xbin/udevadm trigger --action=change --type=devices
  /xbin/udevadm settle
Your Name's avatar
Your Name committed
28
  } || load_modules
29 30 31
  vgscan --mknodes --ignorelockingfailure >/dev/null 2>&1
  vgchange --sysinit --activate y >/dev/null 2>&1

Ali Rıza KESKİN's avatar
Ali Rıza KESKİN committed
32
else
sulincix's avatar
sulincix committed
33
  warn "Eudev not found or disabled"
Your Name's avatar
Your Name committed
34
  load_modules
a's avatar
a committed
35
fi
a's avatar
a committed
36