All of lore.kernel.org
 help / color / mirror / Atom feed
From: bmarzins@sourceware.org <bmarzins@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster/gnbd man/gnbd_export.8 tools/gnbd_expo ...
Date: 8 Aug 2006 21:09:22 -0000	[thread overview]
Message-ID: <20060808210922.14079.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	bmarzins at sourceware.org	2006-08-08 21:09:21

Modified files:
	gnbd/man       : gnbd_export.8 
	gnbd/tools/gnbd_export: gnbd_get_uid 

Log message:
	setting multiple locations for gnbd_get_uid to check for scsi_id, and updating
	the man page. Patches from Fabio

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gnbd/man/gnbd_export.8.diff?cvsroot=cluster&r1=1.4&r2=1.5
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gnbd/tools/gnbd_export/gnbd_get_uid.diff?cvsroot=cluster&r1=1.2&r2=1.3

--- cluster/gnbd/man/gnbd_export.8	2006/06/02 00:39:37	1.4
+++ cluster/gnbd/man/gnbd_export.8	2006/08/08 21:09:21	1.5
@@ -130,7 +130,7 @@
 %n escape sequences. %M will be expanded to the major number of the exported
 device, %m will be expaned to the minor number of the exported device, and
 %n will be expanded to the sysfs name for the device. If no command is given,
-gnbd will use the default command \fI"/sbin/scsi_id -g -u -s /block/%n"\fR. This
+gnbd will use the default command \fI"/usr/sbin/gnbd_get_uid"\fR. This
 command will work for most scsi devices.
 .TP
 \fB-t\fP [\fIseconds\fR]
--- cluster/gnbd/tools/gnbd_export/gnbd_get_uid	2006/06/26 17:29:31	1.2
+++ cluster/gnbd/tools/gnbd_export/gnbd_get_uid	2006/08/08 21:09:21	1.3
@@ -1,7 +1,20 @@
 #!/bin/sh
 set -e
 
-base_uid=`/sbin/scsi_id -g -u -s /block/$1 2> /dev/null`
+oldpath=/sbin/scsi_id
+newpath=/lib/udev/scsi_id
+
+if [ -e "$newpath" ]; then
+	cmd="$newpath"
+else
+	if [ -e "$oldpath" ]; then
+		cmd="$oldpath"
+	else
+		exit 1
+	fi
+fi
+
+base_uid=`$cmd -g -u -s /block/$1 2> /dev/null`
 if echo $1 | grep -q '^.*\/[^0-9]*[0-9]*$' > /dev/null 2>&1 ; then
 	part=`echo $1 | sed 's/^.*\/[^0-9]*\([0-9]*\)$/\1/'`
 	echo GNBD-${part}-${base_uid}



                 reply	other threads:[~2006-08-08 21:09 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20060808210922.14079.qmail@sourceware.org \
    --to=bmarzins@sourceware.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.