aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Schwarzott <zzam@gentoo.org>2011-05-04 18:05:13 +0200
committerMatthias Schwarzott <zzam@gentoo.org>2011-05-14 15:31:51 +0200
commit1347ac88df6c48a92102f41d941781ec529b05bf (patch)
tree0fc48ae2bb40ba33e2a540191997a4c5863ff308
parentLet udev install its files into /lib/udev and not /lib64/udev (diff)
downloadudev-gentoo-scripts-3.tar.gz
udev-gentoo-scripts-3.tar.bz2
udev-gentoo-scripts-3.zip
Only run modprobe unix when necessary.v3
All people having unix domain sockets compiled into the kernel or already loaded need not run modprobe, and so one fork/exec can be saved. X-Gentoo-Bug: 363549 X-Gentoo-Bug-Url: http://bugs.gentoo.org/show_bug.cgi?id=363549
-rw-r--r--rc/openrc/udev8
1 files changed, 5 insertions, 3 deletions
diff --git a/rc/openrc/udev b/rc/openrc/udev
index 88a4a42..699030c 100644
--- a/rc/openrc/udev
+++ b/rc/openrc/udev
@@ -84,9 +84,11 @@ check_openrc_net()
start_udevd()
{
- # load unix domain sockets if built as module, Bug #221253
- if [ -e /proc/modules ] ; then
- modprobe -q unix 2>/dev/null
+ # load unix domain sockets if built as module, Bug #221253 and not yet loaded, Bug #363549
+ if [ ! -e /proc/net/unix ]; then
+ if ! modprobe unix; then
+ eerror "Cannot load the unix domain socket module"
+ fi
fi
local opts="${udev_opts}"