Skip to content
Snippets Groups Projects

update sudo handling

Merged Hahn Axel (hahn) requested to merge 6723-sudo into master
3 files
+ 16
11
Compare changes
  • Side-by-side
  • Inline

Files

+ 4
3
@@ -64,15 +64,16 @@ case "$1" in
@@ -64,15 +64,16 @@ case "$1" in
*)
*)
esac
esac
 
# --- check required tools
 
ph.require ceph
 
# set default / override from command line params
# set default / override from command line params
typeset -i iWarnLimit=$( ph.getValueWithParam 70 w "$@")
typeset -i iWarnLimit=$( ph.getValueWithParam 70 w "$@")
typeset -i iCriticalLimit=$( ph.getValueWithParam 90 c "$@")
typeset -i iCriticalLimit=$( ph.getValueWithParam 90 c "$@")
if ! data=$( sudo -n /bin/ceph df 2>&1 )
if ! data=$( sudo -n /bin/ceph df 2>&1 )
then
then
echo "$data"
ph.abort "UNKNOWN: No sudo permissions to execute ceph commands."
ph.abort "UNKNOWN: ceph is not available or no sudo permissions to execute ceph commands."
fi
fi
isHeader=0
isHeader=0
Loading