Delete kmod related tools provided by busybox.

This commit is contained in:
Windsome Zeng
2022-08-10 10:23:04 +08:00
parent c941f34c05
commit 683fd1f360
2 changed files with 17 additions and 24 deletions
+2 -9
View File
@@ -56,9 +56,9 @@ create_dev_makedev() {
make_static_nodes() {
[ -e /lib/modules/$(uname -r)/modules.devname ] || return 0
[ -x /bin/kmod ] || return 0
[ -x /usr/bin/kmod ] || return 0
/bin/kmod static-nodes --format=tmpfiles --output=/proc/self/fd/1 | \
/usr/bin/kmod static-nodes --format=tmpfiles --output=/proc/self/fd/1 | \
while read type name mode uid gid age arg; do
[ -e $name ] && continue
case "$type" in
@@ -66,10 +66,6 @@ make_static_nodes() {
d|d!) mkdir $name ;;
*) echo "unparseable line ($type $name $mode $uid $gid $age $arg)" >&2 ;;
esac
if [ -x /sbin/restorecon ]; then
/sbin/restorecon $name
fi
done
}
@@ -85,9 +81,6 @@ case "$1" in
# clean up parts of the database created by the initramfs udev
udevadm info --cleanup-db
# set the SELinux context for devices created in the initramfs
[ -x /sbin/restorecon ] && /sbin/restorecon -R /dev
printf "Populating %s using udev: " "${udev_root:-/dev}"
[ -e /proc/sys/kernel/hotplug ] && printf '\000\000\000\000' > /proc/sys/kernel/hotplug
/sbin/udevd -d || { echo "FAIL"; exit 1; }