diff --git a/packages/sysutils/busybox/scripts/createlog b/packages/sysutils/busybox/scripts/createlog index 52d15bc1a3..217c6c08e6 100755 --- a/packages/sysutils/busybox/scripts/createlog +++ b/packages/sysutils/busybox/scripts/createlog @@ -27,7 +27,7 @@ RELEASE="`cat /etc/release`" GIT="`cat /etc/issue |grep git`" getlog_cmd() { - if which $1 >/dev/null; then + if command -v $1 >/dev/null; then echo "################################################################################" >> $BASEDIR/$LOGDIR/$LOGFILE echo "# ... output of $@" >> $BASEDIR/$LOGDIR/$LOGFILE echo "# LibreELEC release: $RELEASE" >> $BASEDIR/$LOGDIR/$LOGFILE @@ -38,6 +38,38 @@ getlog_cmd() { fi } +get_governor_details() { + ( + cat_all_files /sys/devices/system/cpu + cat_all_files /sys/devices/system/cpu/cpufreq + for cpun in /sys/devices/system/cpu/cpu[0-9]*; do + cat_all_files ${cpun}/cpufreq + done + ) +} + +cat_all_files() { + local adir=$1 + local afile var + + [ -d ${adir} ] || return 0 + + echo "${adir}" + + cd ${adir} + for afile in $(find . -maxdepth 1 -print | sort); do + afile=${afile:2} + if [ -n "${afile}" ]; then + if [ -d ${afile} ]; then + var="