diff options
Diffstat (limited to 'Completion/Linux')
-rw-r--r-- | Completion/Linux/Command/_mdadm | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Completion/Linux/Command/_mdadm b/Completion/Linux/Command/_mdadm index 461e66617..940eb6887 100644 --- a/Completion/Linux/Command/_mdadm +++ b/Completion/Linux/Command/_mdadm @@ -147,7 +147,15 @@ fi _mds () { local -a vals - vals=( ${${${(M)${(f)"$(< /etc/mdadm.conf)"}##ARRAY *}//ARRAY /}%%[[:blank:]]*} ) + if [ -r /etc/mdadm.conf ] ; then + local mdadm_conf=/etc/mdadm.conf + elif [ -r /etc/mdadm/mdadm.conf ] ; then + local mdadm_conf=/etc/mdadm/mdadm.conf + else + _message "could not find mdadm.conf" + return 1 + fi + vals=( ${${${(M)${(f)"$(< $mdadm_conf)"}##ARRAY *}//ARRAY /}%%[[:blank:]]*} ) _describe -t mds "RAID devices" vals _arguments \ "(-h --help)"{-h,--help}'[display a mode specific help message]' |