Skip to content

Commit

Permalink
CQM: fix trace output, Makefile, tlp.init.
Browse files Browse the repository at this point in the history
  • Loading branch information
linrunner committed Jul 16, 2019
1 parent e683973 commit 2805a85
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Makefile
Expand Up @@ -149,14 +149,14 @@ endif

install-man-tlp:
# manpages
install -d 755 $(_MAN)/man1
install -d -m 755 $(_MAN)/man1
cd man && install -m 644 $(MANFILES1) $(_MAN)/man1/
install -d 755 $(_MAN)/man8
install -d -m 755 $(_MAN)/man8
cd man && install -m 644 $(MANFILES8) $(_MAN)/man8/

install-man-rdw:
# manpages
install -d 755 $(_MAN)/man8
install -d -m 755 $(_MAN)/man8
cd man-rdw && install -m 644 $(MANFILESRDW8) $(_MAN)/man8/

install: install-tlp install-rdw
Expand Down
6 changes: 4 additions & 2 deletions tlp-func-base.in
Expand Up @@ -65,7 +65,8 @@ echo_debug () { # write debug msg if tag matches -- $1: tag; $2: msg;
[ "$_nodebug" = "1" ] && return 0

if wordinlist "$1" "$TLP_DEBUG"; then
$LOGGER -p debug -t "tlp" --id=$$ "$2"
printf "%s\n" "$2" | \
$LOGGER -p debug -t "tlp" --id=$$ -- > /dev/null 2>&1
fi
}

Expand Down Expand Up @@ -97,7 +98,8 @@ wordinlist () { # test if word in list
check_sysfs () { # debug: check if sysfile exists -- $1: routine; $2: sysfs path
if wordinlist "sysfs" "$TLP_DEBUG"; then
if [ ! -e $2 ]; then
$LOGGER -p debug -t "tlp[$$,$PPID]" "$1: $2 nonexistent"
printf "%s\n" "$1: $2 nonexistent" | \
$LOGGER -p debug -t "tlp" --id=$$ -- > /dev/null 2>&1
fi
fi
}
Expand Down
2 changes: 1 addition & 1 deletion tlp.init
Expand Up @@ -17,7 +17,7 @@
# Description: Initialize tlp
### END INIT INFO

. /lib/lsb/init-functions
[ -r /lib/lsb/init-functions ] && . /lib/lsb/init-functions

TLP=/usr/sbin/tlp
[ -x $TLP ] || exit 0
Expand Down

0 comments on commit 2805a85

Please sign in to comment.