Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 251759 Details for
Bug 342313
sys-apps/openrc: nice support for systems w/out kernel module support (to avoid `modprobe: command not found` warnings)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for the problem
0002-Protect-all-modprobe-calls-with-a-type-check.patch (text/plain), 4.65 KB, created by
Diego Elio Pettenò (RETIRED)
on 2010-10-24 02:09:05 UTC
(
hide
)
Description:
Patch for the problem
Filename:
MIME Type:
Creator:
Diego Elio Pettenò (RETIRED)
Created:
2010-10-24 02:09:05 UTC
Size:
4.65 KB
patch
obsolete
>From b782c980130277c51c7d4ccfef0ddbc00b57e726 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Diego=20Elio=20Petten=C3=B2?= <flameeyes@gmail.com> >Date: Sun, 24 Oct 2010 03:52:38 +0200 >Subject: [PATCH 2/2] Protect all modprobe calls with a type check. > >This makes it possible for OpenRC to not throw errors when there is no >module-init-tools installed (which is the case for monolithic, module-less >kernel setups). >--- > init.d.misc/openvpn.in | 2 +- > init.d/hwclock.in | 2 +- > init.d/procfs.in | 2 +- > net/bonding.sh | 2 +- > net/ccwgroup.sh | 4 +++- > net/clip.sh | 5 ++++- > net/pppd.sh | 4 ++-- > net/tuntap.sh | 2 +- > net/vlan.sh | 4 +++- > 9 files changed, 17 insertions(+), 10 deletions(-) > >diff --git a/init.d.misc/openvpn.in b/init.d.misc/openvpn.in >index eb1360b..5f06cb8 100644 >--- a/init.d.misc/openvpn.in >+++ b/init.d.misc/openvpn.in >@@ -40,7 +40,7 @@ start_pre() > { > # Linux has good dynamic tun/tap creation > if [ "$RC_UNAME" = Linux ]; then >- if [ ! -e /dev/net/tun ]; then >+ if type modprobe >/dev/null 2>&1 && [ ! -e /dev/net/tun ]; then > if ! modprobe tun; then > eerror "TUN/TAP support is not available in this kernel" > return 1 >diff --git a/init.d/hwclock.in b/init.d/hwclock.in >index e99900f..1598820 100644 >--- a/init.d/hwclock.in >+++ b/init.d/hwclock.in >@@ -78,7 +78,7 @@ start() > for rtc in /dev/rtc /dev/rtc[0-9]*; do > [ -e "$rtc" ] && break > done >- if [ ! -e "${rtc}" ]; then >+ if [ ! -e "${rtc}" ] && type modprobe >/dev/null 2>&1; then > modprobe -q rtc-cmos || modprobe -q rtc || modprobe -q genrtc > fi > fi >diff --git a/init.d/procfs.in b/init.d/procfs.in >index c5331b8..c878ca3 100644 >--- a/init.d/procfs.in >+++ b/init.d/procfs.in >@@ -14,7 +14,7 @@ depend() > start() > { > # Make sure we insert usbcore if it's a module >- if [ -f /proc/modules -a ! -d /proc/bus/usb ]; then >+ if type modprobe >/dev/null 2>&1 && [ -f /proc/modules -a ! -d /proc/bus/usb ]; then > modprobe -q usbcore > fi > >diff --git a/net/bonding.sh b/net/bonding.sh >index 1a4886e..9f4b095 100644 >--- a/net/bonding.sh >+++ b/net/bonding.sh >@@ -28,7 +28,7 @@ bonding_pre_start() > > # Load the kernel module if required > if [ ! -d /proc/net/bonding ]; then >- if ! modprobe bonding; then >+ if type modprobe >/dev/null 2>&1 && ! modprobe bonding; then > eerror "Cannot load the bonding module" > return 1 > fi >diff --git a/net/ccwgroup.sh b/net/ccwgroup.sh >index cf08943..f14af1f 100644 >--- a/net/ccwgroup.sh >+++ b/net/ccwgroup.sh >@@ -14,7 +14,9 @@ ccwgroup_pre_start() > [ -z "${ccwgroup}" ] && return 0 > > if [ ! -d /sys/bus/ccwgroup ]; then >- modprobe qeth >+ if type modprobe >/dev/null 2>&1; then >+ modprobe qeth >+ fi > if [ ! -d /sys/bus/ccwgroup ]; then > eerror "ccwgroup support missing in kernel" > return 1 >diff --git a/net/clip.sh b/net/clip.sh >index 3cb84e7..9b8bae6 100644 >--- a/net/clip.sh >+++ b/net/clip.sh >@@ -91,7 +91,10 @@ clip_pre_start() > [ -z "${clip}" ] && return 0 > > if [ ! -r /proc/net/atm/arp ]; then >- modprobe clip && sleep 2 >+ if type modprobe >/dev/null 2>&1; then >+ modprobe clip >+ sleep 2 >+ fi > if [ ! -r /proc/net/atm/arp ]; then > eerror "You need first to enable kernel support for ATM CLIP" > return 1 >diff --git a/net/pppd.sh b/net/pppd.sh >index a8c8882..083518e 100644 >--- a/net/pppd.sh >+++ b/net/pppd.sh >@@ -166,7 +166,7 @@ pppd_pre_start() > if ${haspppoe}; then > if [ ! -e /proc/net/pppoe ]; then > # Load the PPPoE kernel module >- if ! modprobe pppoe; then >+ if type modprobe >/dev/null 2>&1 && ! modprobe pppoe; then > eerror "kernel does not support PPPoE" > return 1 > fi >@@ -180,7 +180,7 @@ pppd_pre_start() > if ${haspppoa}; then > if [ ! -d /proc/net/atm ]; then > # Load the PPPoA kernel module >- if ! modprobe pppoatm; then >+ if type modprobe >/dev/null 2>&1 && ! modprobe pppoatm; then > eerror "kernel does not support PPPoATM" > return 1 > fi >diff --git a/net/tuntap.sh b/net/tuntap.sh >index 2970fdd..82993ad 100644 >--- a/net/tuntap.sh >+++ b/net/tuntap.sh >@@ -21,7 +21,7 @@ tuntap_pre_start() > [ -z "${tuntap}" ] && return 0 > > if [ ! -e /dev/net/tun ]; then >- if ! modprobe tun; then >+ if type modprobe >/dev/null 2>&1 && ! modprobe tun; then > eerror "TUN/TAP support is not present in this kernel" > return 1 > fi >diff --git a/net/vlan.sh b/net/vlan.sh >index c245051..f8cc533 100644 >--- a/net/vlan.sh >+++ b/net/vlan.sh >@@ -26,7 +26,9 @@ _get_vlans() > _check_vlan() > { > if [ ! -d /proc/net/vlan ]; then >- modprobe 8021q >+ if type modprobe >/dev/null 2>&1; then >+ modprobe 8021q >+ fi > if [ ! -d /proc/net/vlan ]; then > eerror "VLAN (802.1q) support is not present in this kernel" > return 1 >-- >1.7.3.2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 342313
:
251759
|
251773