1
0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-11-19 21:44:11 +01:00

17542: Thomas Stromberg: most systems don't have /etc/mtab

This commit is contained in:
Oliver Kiddle 2002-09-16 17:29:17 +00:00
parent bb9a84d4c4
commit 88adedc1d5

@ -734,17 +734,17 @@ udevordir)
local dev_tmp mp_tmp mline
case "$OSTYPE" in
freebsd*)
linux*|irix*)
tmp=( "${(@f)$(< /etc/mtab)}" )
dev_tmp=( "${(@)${(@)tmp%% *}:#none}" )
mp_tmp=( "${(@)${(@)tmp#* }%% *}" )
;;
*)
/sbin/mount | while read mline; do
dev_tmp=( $dev_tmp $mline[(w)1] )
mp_tmp=( $mp_tmp $mline[(w)3] )
done
;;
*)
tmp=( "${(@f)$(< /etc/mtab)}" )
dev_tmp=( "${(@)${(@)tmp%% *}:#none}" )
mp_tmp=( "${(@)${(@)tmp#* }%% *}" )
;;
esac
_alternative \