citadel/meta/recipes-core/initrdscripts/initramfs-framework/mdev
brl 098b8f982b Squashed 'poky/' content from commit 4469acdf1d
git-subtree-dir: poky
git-subtree-split: 4469acdf1d0338220f3fe2ecb5e079eea6fda375
2017-12-04 16:35:29 -05:00

31 lines
512 B
Bash

#!/bin/sh
# Copyright (C) 2011, 2017 O.S. Systems Software LTDA.
# Licensed on MIT
mdev_enabled() {
if [ ! -e /sbin/mdev ]; then
debug "/sbin/mdev doesn't exist"
return 1
fi
return 0
}
mdev_run() {
# setup the environment
mount -t tmpfs tmpfs /dev
mkdir -m 1777 /dev/shm
mkdir -m 0755 /dev/pts
mount -t devpts devpts /dev/pts
echo /sbin/mdev > /proc/sys/kernel/hotplug
mdev -s
# load modules for devices
find /sys -name modalias | while read m; do
load_kernel_module $(cat "$m")
done
}