From: Greg KH <greg@kroah.com>
To: linux-kernel@vger.kernel.org
Cc: ecashin@coraid.com
Subject: [PATCH] aoe status.sh: handle sysfs not in /etc/mtab
Date: Wed, 9 Mar 2005 16:19:23 -0800 [thread overview]
Message-ID: <11104139632443@kroah.com> (raw)
In-Reply-To: <11104139631637@kroah.com>
ChangeSet 1.2039, 2005/03/09 10:21:52-08:00, ecashin@coraid.com
[PATCH] aoe status.sh: handle sysfs not in /etc/mtab
Suse 9.1 Pro doesn't put /sys in /etc/mtab. This patch makes the
example aoe status.sh script work when sysfs is mounted but `mount`
doesn't mention sysfs.
aoe status.sh: handle sysfs not in /etc/mtab
Signed-off-by: Ed L. Cashin <ecashin@coraid.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Documentation/aoe/status.sh | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff -Nru a/Documentation/aoe/status.sh b/Documentation/aoe/status.sh
--- a/Documentation/aoe/status.sh 2005-03-09 16:15:46 -08:00
+++ b/Documentation/aoe/status.sh 2005-03-09 16:15:46 -08:00
@@ -4,10 +4,13 @@
set -e
format="%8s\t%8s\t%8s\n"
me=`basename $0`
+sysd=${sysfs_dir:-/sys}
# printf "$format" device mac netif state
-test -z "`mount | grep sysfs`" && {
+# Suse 9.1 Pro doesn't put /sys in /etc/mtab
+#test -z "`mount | grep sysfs`" && {
+test ! -d "$sysd/block" && {
echo "$me Error: sysfs is not mounted" 1>&2
exit 1
}
@@ -16,7 +19,7 @@
exit 1
}
-for d in `ls -d /sys/block/etherd* 2>/dev/null | grep -v p` end; do
+for d in `ls -d $sysd/block/etherd* 2>/dev/null | grep -v p` end; do
# maybe ls comes up empty, so we use "end"
test $d = end && continue
next prev parent reply other threads:[~2005-03-10 1:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-10 0:18 [BK PATCH] AOE fixes for 2.6.11 Greg KH
2005-03-10 0:19 ` [PATCH] AoE warning on 64-bit archs Greg KH
2005-03-10 0:19 ` [PATCH] aoe: add documentation for udev users Greg KH
2005-03-10 0:19 ` [PATCH] aoe: update " Greg KH
2005-03-10 0:19 ` [PATCH] aoe: fail IO on disk errors Greg KH
2005-03-10 0:19 ` Greg KH [this message]
2005-03-10 0:19 ` [PATCH] aoe: drivers/block/aoe/aoechr.c cleanups Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=11104139632443@kroah.com \
--to=greg@kroah.com \
--cc=ecashin@coraid.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox