From a8aafc7725cfb9b0747008dbfa316062ef1ee489 Mon Sep 17 00:00:00 2001 From: erdgeist <> Date: Sat, 21 Sep 2013 18:39:13 +0000 Subject: make last line of configs also finish with a newline. Also fix location of hostname --- minimunin | 4 ++-- 1 file 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 ^$ main() { # print banner - printf "# moonshell node at %s\n" `hostname` + printf "# moonshell node at %s\n" `/bin/hostname` # read commands in loop while read command arg; do @@ -321,7 +321,7 @@ call_plugin() { _plug=`/usr/bin/find ${PLUGIN_DIR} -type f -perm +111 -name $1 2>/dev/null | /usr/bin/head -n 1` [ -z "${_plug}" ] && return 1 - printf %s "${CONFIGS}" | while read line; do + printf "%s\n" "${CONFIGS}" | while read line; do case line in \[*\]) start_section;; *) in_section;; -- cgit v1.2.3