Distributed Replicated Block Device (DRBD) development
 help / color / mirror / Atom feed
From: Dominik Klein <dk@in-telegence.net>
To: drbd-dev@lists.linbit.com
Subject: [Drbd-dev] Patch: drbdadm.sh
Date: Wed, 18 Feb 2009 14:39:20 +0100	[thread overview]
Message-ID: <499C0F88.3050303@in-telegence.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 416 bytes --]

When using the bash completion feature on machines with currently
unconfigured drbd resources, it kept throwing error messages rendering
the cmdline unreadable.

Typing "drbdadm pr<tab> <tab>" would give s.th. like

dktest3:~ # drbdadm primary /dev/drbd0: Failure: (127) Device minor not
allocated
Command 'drbdsetup /dev/drbd0 state' terminated with exit code 10
kvm2

Consider the attached patch.

Regards
Dominik

[-- Attachment #2: drbdadm.sh.patch --]
[-- Type: text/x-patch, Size: 478 bytes --]

--- /etc/bash_completion.d/drbdadm.sh	2009-02-18 14:25:18.000000000 +0100
+++ /etc/bash_completion.d/drbdadm.sh	2009-02-18 14:28:05.000000000 +0100
@@ -36,7 +36,7 @@
 	local resources="$(drbdadm sh-resources)"
 	local filtered_resources
 	for res in $resources; do
-		local resource_status="$(drbdadm $status_type $res 2>/dev/null)"
+		local resource_status="$(drbdadm $status_type $res)"
 		local i
 		for i in $status_filter; do
 			if [ "${resource_status%%/*}" = $i ]; then

             reply	other threads:[~2009-02-18 13:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-18 13:39 Dominik Klein [this message]
2009-02-18 13:45 ` [Drbd-dev] Patch: drbdadm.sh Dominik Klein

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=499C0F88.3050303@in-telegence.net \
    --to=dk@in-telegence.net \
    --cc=drbd-dev@lists.linbit.com \
    /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