Patch: drbdadm.sh
Quoted 11 lines · Dominik Klein
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/drbd0state' terminated with exit code 10 kvm2
Quoted 5 lines
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
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
etc/bash_completion.d/drbdadm.sh +1 -1
@@ -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