On temperatur.nu I found the guide OWFS Howto very useful. There is one thing to update for me:
- I had to start it with the following line:
/opt/owfs/bin/owfs --allow_other --passive=/dev/ttyS0 /mnt/1wire
#!/bin/bash
#
# OWFS
#
# Author: Niklas Lanzen
# chkconfig: 1000 50 50
# description: 1 wire
#
RETVAL=0;
prog="OWFS (One Wire File System)"
exec="/opt/owfs/bin/owfs --allow_other --passive=/dev/ttyS0 /mnt/1wire"
#lockfile=""
# Source function library.
. /etc/init.d/functions
start() {
echo -n $"Starting $prog: "
$exec
RETVAL=$?
[ $RETVAL -eq 0 ] && success || failure
echo
}
stop() {
[ $UID -eq 0 ] || exit 4
echo -n $"Stopping $prog: "
success
echo
}
restart() {
stop
sleep 1
start
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
RETVAL=$?
;;
*)
echo $"Usage: $0 {start|stop|restart}"
RETVAL=2
[ "$1" = 'usage' ] && RETVAL=0
esac
No comments:
Post a Comment