1
0
mirror of https://github.com/limosek/zaf.git synced 2024-11-24 03:19:05 +01:00

Changed tr to tolower

This commit is contained in:
Lukas Macura 2016-04-08 23:57:04 +02:00
parent f5fd888441
commit 8abf0306f7
2 changed files with 13 additions and 6 deletions

View File

@ -19,23 +19,23 @@ zaf_configure_os_freebsd() {
zaf_detect_system() { zaf_detect_system() {
if which dpkg >/dev/null; then if which dpkg >/dev/null; then
ZAF_PKG=dpkg ZAF_PKG=dpkg
ZAF_OS=$(lsb_release -is|tr '[:upper:]' '[:lower:]') ZAF_OS=$(lsb_release -is|zaf_tolower)
ZAF_OS_CODENAME=$(lsb_release -cs|tr '[:upper:]' '[:lower:]') ZAF_OS_CODENAME=$(lsb_release -cs|zaf_tolower)
ZAF_CURL_INSECURE=0 ZAF_CURL_INSECURE=0
ZAF_AGENT_PKG="zabbix-agent" ZAF_AGENT_PKG="zabbix-agent"
return return
else if which rpm >/dev/null; then else if which rpm >/dev/null; then
ZAF_PKG="rpm" ZAF_PKG="rpm"
ZAF_OS=$(lsb_release -is|tr '[:upper:]' '[:lower:]') ZAF_OS=$(lsb_release -is|zaf_tolower)
ZAF_OS_CODENAME=$(lsb_release -cs|tr '[:upper:]' '[:lower:]') ZAF_OS_CODENAME=$(lsb_release -cs|zaf_tolower)
ZAF_CURL_INSECURE=0 ZAF_CURL_INSECURE=0
ZAF_AGENT_PKG="zabbix-agent" ZAF_AGENT_PKG="zabbix-agent"
return return
else if which opkg >/dev/null; then else if which opkg >/dev/null; then
ZAF_PKG="opkg" ZAF_PKG="opkg"
. /etc/openwrt_release . /etc/openwrt_release
ZAF_OS="$(echo $DISTRIB_ID|tr '[:upper:]' '[:lower:]')" ZAF_OS="$(echo $DISTRIB_ID|zaf_tolower)"
ZAF_OS_CODENAME="$(echo $DISTRIB_CODENAME|tr '[:upper:]' '[:lower:]')" ZAF_OS_CODENAME="$(echo $DISTRIB_CODENAME|zaf_tolower)"
return return
else if which pkg >/dev/null; then else if which pkg >/dev/null; then
ZAF_PKG="pkg" ZAF_PKG="pkg"

View File

@ -340,4 +340,11 @@ zaf_remove_plugin() {
rm -f ${ZAF_AGENT_CONFIGD}/zaf_${plugin}.conf rm -f ${ZAF_AGENT_CONFIGD}/zaf_${plugin}.conf
} }
zaf_tolower() {
tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'
}
zaf_toupper() {
tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
}