mirror of
https://github.com/ceph/ceph
synced 2024-12-28 14:34:13 +00:00
ceph_common.sh: sort -u to avoid extra operation
Use "sort -u" to remove the repeat of any mon/mds/mgr/osd in case of double operation. Signed-off-by: Ovidiu Poncea <ovidiu.poncea@windriver.com>
This commit is contained in:
parent
d613747554
commit
6746624cac
@ -182,10 +182,14 @@ get_name_list() {
|
||||
orig="$*"
|
||||
|
||||
# extract list of monitors, mdss, osds, mgrs defined in startup.conf
|
||||
allconf="$local "`$CCONF -c $conf -l mon | egrep -v '^mon$' || true ; \
|
||||
$CCONF -c $conf -l mds | egrep -v '^mds$' || true ; \
|
||||
$CCONF -c $conf -l mgr | egrep -v '^mgr$' || true ; \
|
||||
$CCONF -c $conf -l osd | egrep -v '^osd$' || true`
|
||||
allconf=$(for entity in \
|
||||
$local \
|
||||
`$CCONF -c $conf -l mon | egrep -v '^mon$' || true` \
|
||||
`$CCONF -c $conf -l mds | egrep -v '^mds$' || true` \
|
||||
`$CCONF -c $conf -l mgr | egrep -v '^mgr$' || true` \
|
||||
`$CCONF -c $conf -l osd | egrep -v '^osd$' || true`; do
|
||||
echo $entity
|
||||
done | sort -u)
|
||||
|
||||
if [ -z "$orig" ]; then
|
||||
what="$allconf"
|
||||
|
Loading…
Reference in New Issue
Block a user