diff options
Diffstat (limited to 'system/thinkfan')
-rw-r--r-- | system/thinkfan/README | 8 | ||||
-rw-r--r-- | system/thinkfan/rc.thinkfan | 2 | ||||
-rw-r--r-- | system/thinkfan/thinkfan.SlackBuild | 16 |
3 files changed, 18 insertions, 8 deletions
diff --git a/system/thinkfan/README b/system/thinkfan/README index 392321b4fa..fac9fb8043 100644 --- a/system/thinkfan/README +++ b/system/thinkfan/README @@ -1,7 +1,7 @@ -Thinkfan is a simple, lightweight fan control program. Originally designed -specifically for IBM/Lenovo Thinkpads, it now supports any kind of system via -the sysfs hwmon interface (/sys/class/hwmon). It is designed to eat as little -CPU power as possible. +Thinkfan is a simple, lightweight fan control program. Originally +designed specifically for IBM/Lenovo Thinkpads, it now supports any +kind of system via the sysfs hwmon interface (/sys/class/hwmon). It is +designed to eat as little CPU power as possible. Before using /etc/rc.d/rc.thinkfan, make sure to create and configure a /etc/thinkfan.conf file or the daemon will not start. diff --git a/system/thinkfan/rc.thinkfan b/system/thinkfan/rc.thinkfan index fae364cbe5..732a9542d4 100644 --- a/system/thinkfan/rc.thinkfan +++ b/system/thinkfan/rc.thinkfan @@ -1,7 +1,7 @@ #!/bin/sh NAME=thinkfan -BIN=/usr/bin/$NAME +BIN=/usr/sbin/$NAME CONFIG=/etc/thinkfan.conf ARGS="-q -c $CONFIG" PIDFILE=/var/run/$NAME.pid diff --git a/system/thinkfan/thinkfan.SlackBuild b/system/thinkfan/thinkfan.SlackBuild index b3a0afefcc..c21727fb8c 100644 --- a/system/thinkfan/thinkfan.SlackBuild +++ b/system/thinkfan/thinkfan.SlackBuild @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for thinkfan @@ -22,10 +22,13 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=thinkfan VERSION=${VERSION:-1.1} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -35,7 +38,14 @@ if [ -z "$ARCH" ]; then esac fi -CWD=$(pwd) +# If the variable PRINT_PACKAGE_NAME is set, then this script will report what +# the name of the created package would be, and then exit. This information +# could be useful to other scripts. +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} @@ -105,4 +115,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE |