summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorerdgeist <>2013-09-21 18:39:13 +0000
committererdgeist <>2013-09-21 18:39:13 +0000
commita8aafc7725cfb9b0747008dbfa316062ef1ee489 (patch)
tree1676ffb8504f34e97f8bad52360984a105eda283
parent0146e7d9731fb365c3277928f98410ad4d2434ab (diff)
make last line of configs also finish with a newline. Also fix location of hostname
-rwxr-xr-xminimunin4
1 files changed, 2 insertions, 2 deletions
diff --git a/minimunin b/minimunin
index 15289bc..72e155d 100755
--- a/minimunin
+++ b/minimunin
@@ -12,7 +12,7 @@ CONFIGS=`/usr/bin/find ${CONFIG_DIR} -type f -exec /usr/bin/grep -v -e ^\# -e ^$
12 12
13main() { 13main() {
14 # print banner 14 # print banner
15 printf "# moonshell node at %s\n" `hostname` 15 printf "# moonshell node at %s\n" `/bin/hostname`
16 16
17 # read commands in loop 17 # read commands in loop
18 while read command arg; do 18 while read command arg; do
@@ -321,7 +321,7 @@ call_plugin() {
321 _plug=`/usr/bin/find ${PLUGIN_DIR} -type f -perm +111 -name $1 2>/dev/null | /usr/bin/head -n 1` 321 _plug=`/usr/bin/find ${PLUGIN_DIR} -type f -perm +111 -name $1 2>/dev/null | /usr/bin/head -n 1`
322 [ -z "${_plug}" ] && return 1 322 [ -z "${_plug}" ] && return 1
323 323
324 printf %s "${CONFIGS}" | while read line; do 324 printf "%s\n" "${CONFIGS}" | while read line; do
325 case line in 325 case line in
326 \[*\]) start_section;; 326 \[*\]) start_section;;
327 *) in_section;; 327 *) in_section;;