Distributed Replicated Block Device (DRBD) development
 help / color / mirror / Atom feed
* [Drbd-dev] Patch: drbdadm.sh
@ 2009-02-18 13:39 Dominik Klein
  2009-02-18 13:45 ` Dominik Klein
  0 siblings, 1 reply; 2+ messages in thread
From: Dominik Klein @ 2009-02-18 13:39 UTC (permalink / raw)
  To: drbd-dev

[-- 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Drbd-dev] Patch: drbdadm.sh
  2009-02-18 13:39 [Drbd-dev] Patch: drbdadm.sh Dominik Klein
@ 2009-02-18 13:45 ` Dominik Klein
  0 siblings, 0 replies; 2+ messages in thread
From: Dominik Klein @ 2009-02-18 13:45 UTC (permalink / raw)
  To: drbd-dev

Dominik Klein wrote:
> 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
> 

Well, this happens when you use diff with "new old" instead of "old
new". Guess you got the idea anyway.

Regards
Dominik

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-02-18 13:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-18 13:39 [Drbd-dev] Patch: drbdadm.sh Dominik Klein
2009-02-18 13:45 ` Dominik Klein

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox