1
0
mirror of https://github.com/limosek/zaf.git synced 2024-11-14 06:29:07 +01:00

Minor changes

This commit is contained in:
Lukas Macura 2016-04-07 13:20:55 +02:00
parent ea6bf3d83a
commit 9b190e57ea
2 changed files with 6 additions and 2 deletions

View File

@ -71,4 +71,8 @@ deb-changelog:
deb-package:
@dpkg-deb -b $(DEBIAN_DIR) $(DEBIAN_PKG)
@echo "\nCheck configuration:"
@cat $(DEBIAN_DIR)/etc/zaf.conf
@echo

View File

@ -111,7 +111,7 @@ zaf_set_option(){
zaf_set_agent_option() {
local option="$1"
local value="$2"
if grep ^$option\= $ZAF_AGENT_CONFIG; then
if grep -q ^$option\= $ZAF_AGENT_CONFIG; then
zaf_dbg "Setting option $option in $ZAF_AGENT_CONFIG."
sed -i "s/$option=(.*)/$option=$2/" $ZAF_AGENT_CONFIG
fi
@ -135,7 +135,7 @@ zaf_add_agent_option() {
zaf_move_agent_option() {
local option="$1"
local value="$2"
if grep ^$option\= $ZAF_AGENT_CONFIG; then
if grep -q ^$option\= $ZAF_AGENT_CONFIG; then
zaf_dbg "Moving option $option from $ZAF_AGENT_CONFIG to ."
sed -i "s/$option=(.*)/$option=$2/" $ZAF_AGENT_CONFIG
fi