Patchwork [CONSOLIDATED,PULL,15/25] initscripts: avoid mounting /sys if it is already mounted

login
register
mail settings
Submitter Saul Wold
Date Jan. 6, 2012, 7:56 a.m.
Message ID <4ae99224e235ee760923ce7a781bb1a6dd8a7cb9.1325836241.git.sgw@linux.intel.com>
Download mbox | patch
Permalink /patch/18567/
State New
Headers show

Comments

Saul Wold - Jan. 6, 2012, 7:56 a.m.
From: Otavio Salvador <otavio@ossystems.com.br>

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
 .../initscripts/initscripts-1.0/sysfs.sh           |    4 ++--
 meta/recipes-core/initscripts/initscripts_1.0.bb   |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

Patch

diff --git a/meta/recipes-core/initscripts/initscripts-1.0/sysfs.sh b/meta/recipes-core/initscripts/initscripts-1.0/sysfs.sh
index be28bb3..bd87dcd 100644
--- a/meta/recipes-core/initscripts/initscripts-1.0/sysfs.sh
+++ b/meta/recipes-core/initscripts/initscripts-1.0/sysfs.sh
@@ -14,6 +14,6 @@  if [ -e /proc ] && ! [ -e /proc/mounts ]; then
   mount -t proc proc /proc
 fi
 
-if [ -e /sys ] && grep -q sysfs /proc/filesystems; then
-  mount sysfs /sys -t sysfs
+if [ -e /sys ] && grep -q sysfs /proc/filesystems && ! [ -e /sys/class ]; then
+  mount -t sysfs sysfs /sys
 fi
diff --git a/meta/recipes-core/initscripts/initscripts_1.0.bb b/meta/recipes-core/initscripts/initscripts_1.0.bb
index ffca817..98f5e9b 100644
--- a/meta/recipes-core/initscripts/initscripts_1.0.bb
+++ b/meta/recipes-core/initscripts/initscripts_1.0.bb
@@ -3,7 +3,7 @@  DESCRIPTION = "Initscripts provide the basic system startup initialization scrip
 SECTION = "base"
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
-PR = "r127"
+PR = "r128"
 
 INHIBIT_DEFAULT_DEPS = "1"