Skip to content
Snippets Groups Projects
Commit ca0ca568 authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

Merge branch '6723-sudo' into 'master'

update sudo handling in ceph checks

See merge request !194
parents 127e7f98 234af166
No related branches found
No related tags found
1 merge request!194update sudo handling in ceph checks
......@@ -88,9 +88,11 @@ case "$1" in
*)
esac
# --- check required tools
ph.require ceph
if ! data=$( sudo -n /bin/ceph osd tree 2>&1 ); then
echo "$data"
ph.abort "UNKNOWN: ceph is not available or no sudo permissions to execute ceph commands."
ph.abort "UNKNOWN: No sudo permissions to execute ceph commands."
fi
# set default / override from command line params
......
......@@ -67,8 +67,7 @@ EOF
function readCephStatus(){
if ! data=$( sudo -n /bin/ceph status 2>&1 ); then
echo "$data"
ph.abort "UNKNOWN: ceph is not available or no sudo permissions to execute ceph commands."
ph.abort "UNKNOWN: No sudo permissions to execute ceph commands."
fi
}
function getCephStatus(){
......@@ -98,6 +97,9 @@ case "$1" in
*)
esac
# --- check required tools
ph.require ceph
readCephStatus
if [ ! -f $initfile ]; then
echo "
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment