Hallo,
Ich habe vor ein paar Wochen meinen Raspberry Pi erhalten (Raspberry Pi | An ARM GNU/Linux box for $25. Take a byte!), und nachdem ich alle möglichen andere Dinge damit ausprobiert habe, soll er nun als Logik/Visu-Engine Dienst tun. Deswegen habe ich, ausgehend vom Debian Image den eibd, linknx sowie die Cometvisu installiert.
Fertig ist das alles noch nicht wirklich, aber die von mir momentan benötigte Basis-Funktionalität ist da. Die Installation war sehr viel 'googlen und ausprobieren', das geht alles sicher noch einen Zacken hübscher. Amüsanterweise sind die meisten Links, die Google anbot, auf das Forum hier :-)
Ich hab's mal aufgeschrieben, falls wer damit was anfangen kann.
Wir gehen von der debian squeeze installation aus, die man für den Pi downloaden und auf eine CF-Karte dd'en kann. Zuerst wird das System aktualisiert und die Tools installiert, ohne die ich nicht kann:
	Und dann noch ein bisschen was, ohne das das System nicht kann:
	Dann downloaden/installieren wir uns pthsem:
	Sinnvoll wäre jetzt auch folgendes:
	... damit der Rest des Systems auch über pthsem Bescheid weiss.
Als nächstes der eibd, dazu fügen wir das wiregate-repository in die /etc/apt/sources.lst ein:
	Die Source reicht uns, kompilieren müssen wir sowieso selbst.
Wir binden den public key ein, updaten apt und installieren die sources:
	Dann compilen wir:
	Als nächstes kommt linknx:
	Praktisch wären dann noch initscripts für eibd und linknx, die nach /etc/init.d kommen:
eibd:
	linknx:
	Diese können wir dann mit 
	automatisch starten lassen.
linknx will übrigens eine linknx.xml in /var/lib/linknx.
Dann kommt die CometVisu und der benötigte Webserver, ich habe lighttpd benutzt:
	Die Gruppe www-data wird aus irgendeinem Grund dpkg nicht angelegt, deswegen machen wir das manuell.
Ausserdem gibt's zumindest bei mir ein Problem mit den cgi's, das ich durch einen edit in /etc/lighttpd/conf-enabled/10-cgi.conf lösen konnte.
Man ergänze den Teil um $HTTP wie folgt:
	Dann noch ein
	Und wir können uns an die Cometvisu machen:
	Dann fehlen uns noch die Links auf r und w:
	Sowie das 'l' File, das auch in cgi-bin liegen muss und folgenden Inhalt hat:
	Das war's :-)
Mit einer sinnvoll gefütterten linknx.xml tut's die Logik, und auch die Basis-Funktionen der Visu funktionieren. Mir fehlt noch der ganze rrd-Teil, da muss ich mich mal drangeben.
Ich hatte eine visu_config.xml und eine linknx.xml, die ich von meinem amd64-Server, ebenfalls unter Squeeze, einfach nur rüberkopierte. Auf den ersten Blick fühlt sich der Pi in der Visu nicht wirklich langsamer als der "richtige" PC an.
					Ich habe vor ein paar Wochen meinen Raspberry Pi erhalten (Raspberry Pi | An ARM GNU/Linux box for $25. Take a byte!), und nachdem ich alle möglichen andere Dinge damit ausprobiert habe, soll er nun als Logik/Visu-Engine Dienst tun. Deswegen habe ich, ausgehend vom Debian Image den eibd, linknx sowie die Cometvisu installiert.
Fertig ist das alles noch nicht wirklich, aber die von mir momentan benötigte Basis-Funktionalität ist da. Die Installation war sehr viel 'googlen und ausprobieren', das geht alles sicher noch einen Zacken hübscher. Amüsanterweise sind die meisten Links, die Google anbot, auf das Forum hier :-)
Ich hab's mal aufgeschrieben, falls wer damit was anfangen kann.
Wir gehen von der debian squeeze installation aus, die man für den Pi downloaden und auf eine CF-Karte dd'en kann. Zuerst wird das System aktualisiert und die Tools installiert, ohne die ich nicht kann:
Code:
	
	apt-get update apt-get dist-upgrade apt-get install tmux vim
Code:
	
	apt-get install libxml2-dev liblua5.1-0-dev
Code:
	
	wget --no-check-certificate https://www.auto.tuwien.ac.at/~mkoegler/pth/pthsem_2.0.8.tar.gz tar -zxvf pth_2.0.8.tar.gz cd pthsem-2.0.8 ./configure --with-mctx-mth=sjlj --with-mctx-dsp=ssjlj --with-mctx-stk=sas --disable-shared make make install
Code:
	
	LD_LIBRARY_PATH="/usr/local/lib/" ldconfig
Als nächstes der eibd, dazu fügen wir das wiregate-repository in die /etc/apt/sources.lst ein:
Code:
	
	# WireGate repository #deb http://repo.wiregate.de/wiregate wiregate-0.1 main deb-src http://repo.wiregate.de/wiregate wiregate-0.1 main
Wir binden den public key ein, updaten apt und installieren die sources:
Code:
	
	wget http://repo.wiregate.de/wiregate/wiregate-apt-pubkey apt-key add wiregate-apt-pubkey apt-get update apt-get source eibd-server eibd-clients
Code:
	
	cd bcusdk-0.0.4+nmu18 ./configure --without-pth-test --with-mctx-mth=sjlj --with-mctx-dsp=ssjlj --with-mctx-stk=sas --enable-onlyeibd --enable-eibnetip --enable-eibnetiptunnel --enable-eibnetipserver --enable-groupcache --enable-usb make make install
Code:
	
	wget http://downloads.sourceforge.net/project/linknx/linknx/linknx-0.0.1.30/linknx-0.0.1.30.tar.gz tar -zxvf linknx-0.0.1.30.tar.gz cd linknx-0.0.1.30 ./configure --with-lua --without-pth-test make make install
eibd:
Code:
	
	#!/bin/sh
### BEGIN INIT INFO
# Provides:          eibd
# Required-Start:    $local_fs $remote_fs $network
# Required-Stop:     $local_fs $remote_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: eibd initscript
# Description:       based on init-script from knx-user-forum.de and setup-eibd.sh from KNXlive-project
#                    Pending: check tpuarts, check KNXnet/IP-Response
### END INIT INFO
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin
DESC="EIB/KNX daemon"
NAME=eibd
DAEMON=/usr/local/bin/$NAME
DAEMON_ARGS="-d -u --eibaddr=1.1.100 -c -DTS -R -i --pid-file=/var/run/$NAME.pid"
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
# Default URL, config read from default later
# !!! DO NOT CHANGE DEFAULTS HERE - use /etc/default/eibd !!!
# AUTO scans and saves as default
EIBD_BACKEND="AUTO"
# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0
# Read configuration variable file if it is present
# Temp-fix! remove surrounding whitespaces from seperator '='
[ -r /etc/default/$NAME ] && cat /etc/default/$NAME | sed 's/ =/=/' | sed 's/= /=/' > /etc/default/$NAME.out
[ -r /etc/default/$NAME.out ] && . /etc/default/$NAME.out
# Load the VERBOSE setting and other rcS variables
. /lib/init/vars.sh
# Define LSB log_* functions.
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
. /lib/lsb/init-functions
do_init()
{
    # Auto-Detection Backend-interface
    if [ "$EIBD_BACKEND" = "AUTO" -o "$EIBD_BACKEND" = "usb" ]; then 
        [ "$VERBOSE" != no ] && log_daemon_msg "Autodetecting eibd-Backend"
        echo -ne "\t *** $NAME: Autodetecting Interface ."
        # try USB
        # old EIBD_USBPORT=$(findknxusb | sed -e '1 d' -e 's/device //' | cut -d':' -f1-2)
        EIBD_USBPORT=$(findknxusb | sed -e '1 d' -e 's/device //' | cut -d ' ' -f 2 | cut -d':' -f1-2); echo $EIBD_USBPORT
        if [ -n "$EIBD_USBPORT" ]
            then 
            EIBD_BACKEND=usb
            EIBD_URL=$EIBD_BACKEND:$EIBD_USBPORT
            [ "$VERBOSE" != no ] && log_daemon_msg " success on $EIBD_URL"
            echo -e " success on $EIBD_URL"
        fi
    fi
    if [ "$EIBD_BACKEND" = "AUTO" -a -e /dev/ttyS0 ]; then 
        # try FT1.2 on /dev/ttyS0
        echo -n " ."
        setserial /dev/ttyS0 autoconfig
        if bcuaddrtab -T 10 ft12:/dev/ttyS0 >/dev/null ;    then 
            EIBD_BACKEND=ft12
            EIBD_URL=$EIBD_BACKEND:/dev/ttyS0
            [ "$VERBOSE" != no ] && log_daemon_msg " success on $EIBD_URL"
            echo -e " success on $EIBD_URL"
        fi
    fi
    if [ "$EIBD_BACKEND" = "AUTO" -a -e /dev/eib0 ]; then 
        # try BCU1 Kernel-Driver on /dev/ttyS0
        echo -n " ."
        setserial /dev/ttyS0 uart none
        if bcuaddrtab -T 10 bcu1:/dev/eib0 >/dev/null ; then 
            EIBD_BACKEND=bcu1
            EIBD_URL=$EIBD_BACKEND:/dev/eib0
            [ "$VERBOSE" != no ] && log_daemon_msg " success on $EIBD_URL"
            echo -e " success on $EIBD_URL"
        fi
    fi
    if [ "$EIBD_BACKEND" = "AUTO" ]; then 
        # try KNXnet/IP Routing with default Multicast 224.0.23.12
        echo -n " ."
        EIBNETTMP=`mktemp`
        eibnetsearch - > $EIBNETTMP
        EIBD_NET_MCAST=`grep Multicast $EIBNETTMP | cut -d' ' -f2`
        EIBD_NET_HOST=`grep Answer $EIBNETTMP | cut -d' ' -f3`
        EIBD_NET_NAME=`grep Name $EIBNETTMP | cut -d' ' -f2`
        EIBD_MY_IP=`ifconfig eth0 | grep 'inet addr' | sed -e 's/:/ /' | awk '{print $3}'`
        rm $EIBNETTMP
        if [ "$EIBD_NET_MCAST" != "" -a "$EIBD_NET_HOST" != "$EIBD_MY_IP" ]; then 
            EIBD_BACKEND=ip
            EIBD_URL=$EIBD_BACKEND:
            [ "$VERBOSE" != no ] && log_daemon_msg "Found KNXnet/IP Router $EIBD_NET_NAME on $EIBD_NET_HOST with $EIBD_NET_MCAST"
            echo -e "Found KNXnet/IP Router $EIBD_NET_NAME on $EIBD_NET_HOST with $EIBD_NET_MCAST"
        fi
    fi
    if [ "$EIBD_BACKEND" = "AUTO" -a -e /dev/ttyS1 ]; then 
        # try FT1.2 on /dev/ttyS1
        echo -n " ."
        setserial /dev/ttyS1 autoconfig
        if bcuaddrtab -T 10 ft12:/dev/ttyS1 >/dev/null ; then 
            EIBD_BACKEND=ft12
            EIBD_URL=$EIBD_BACKEND:/dev/ttyS1
            [ "$VERBOSE" != no ] && log_daemon_msg " success on $EIBD_URL"
            echo -e " success on $EIBD_URL"
        fi
    fi
    if [ "$EIBD_BACKEND" = "AUTO" -a -e /dev/eib1 ]; then 
        # try BCU1 Kernel-Driver on /dev/ttyS1
        echo -n " ."
        setserial /dev/ttyS1 uart none
        if bcuaddrtab -T 10 bcu1:/dev/eib1 >/dev/null ; then 
            EIBD_BACKEND=bcu1
            EIBD_URL=$EIBD_BACKEND:/dev/eib1
            [ "$VERBOSE" != no ] && log_daemon_msg " success on $EIBD_URL"
            echo -e " success on $EIBD_URL"
        fi
    fi
    if [ "$EIBD_BACKEND" = "AUTO" ]; then 
        # Autodetect failed - bailout
        echo -e "\t *** $NAME: Autodetect failed - exiting !"
        exit 0
    fi
    # concat urls
    if [ "$EIBD_BACKEND" = "ip" -a -n "$EIBD_PORT_IP" ]; then
        EIBD_URL=$EIBD_BACKEND:$EIBD_PORT_IP
    fi
    if [ "$EIBD_BACKEND" = "ipt" -a -n "$EIBD_PORT_IPT" ]; then
        EIBD_URL=$EIBD_BACKEND:$EIBD_PORT_IPT
    fi
    # init serial port accordingly
    if [ "$EIBD_BACKEND" = "ft12" -a -n "$EIBD_PORT_SERIAL" ]; then
        setserial $EIBD_PORT_SERIAL autoconfig
        EIBD_URL=$EIBD_BACKEND:$EIBD_PORT_SERIAL
    fi
    if [ "$EIBD_BACKEND" = "bcu1" -a "$EIBD_PORT_SERIAL" = "/dev/eib0" ]; then
        setserial /dev/ttyS0 uart none
        EIBD_URL=$EIBD_BACKEND:$EIBD_PORT_SERIAL
    fi
    if [ "$EIBD_BACKEND" = "bcu1" -a "$EIBD_PORT_SERIAL" = "/dev/eib1" ]; then
        setserial /dev/ttyS1 uart none
        EIBD_URL=$EIBD_BACKEND:$EIBD_PORT_SERIAL
    fi
    if [ "$EIBD_BACKEND" = "tpuarts" -a -n "$EIBD_PORT_SERIAL" ]; then
        setserial $EIBD_PORT_SERIAL autoconfig
        EIBD_URL=$EIBD_BACKEND:$EIBD_PORT_SERIAL
    fi
    # concat EIBD_URL (obsolete!)
    if [ -z "$EIBD_URL" -a -n "$EIBD_PORT" ]; then
        EIBD_URL=$EIBD_BACKEND:$EIBD_PORT
    fi
    # check/write bcuaddrtab
    if [ "$EIBD_BACKEND" = "usb" -o "$EIBD_BACKEND" = "ft12" -o "$EIBD_BACKEND" = "bcu1" -a -n "$EIBD_URL" ]; then
        EIBD_BCUADDRTAB=`bcuaddrtab -T 10 $EIBD_URL | cut -d ' ' -f 2`
        if [ "$EIBD_BCUADDRTAB" = "expected" -o "$EIBD_BCUADDRTAB" = "failed" -o "$EIBD_BCUADDRTAB" = "timed" ]; then 
            # retry 1
            echo -n "Unable to read BCU address table - retrying 1"
            sleep 2
            EIBD_BCUADDRTAB=`bcuaddrtab -T 10 $EIBD_URL | cut -d ' ' -f 2`
            if [ "$EIBD_BCUADDRTAB" = "expected" -o "$EIBD_BCUADDRTAB" = "failed" -o "$EIBD_BCUADDRTAB" = "timed" ]; then 
                # retry 2
                echo -n " - retrying 2 .."
                sleep 2
                EIBD_BCUADDRTAB=`bcuaddrtab -T 10 $EIBD_URL | cut -d ' ' -f 2`
                if [ "$EIBD_BCUADDRTAB" = "expected" -o "$EIBD_BCUADDRTAB" = "failed" -o "$EIBD_BCUADDRTAB" = "timed" ]; then 
                    echo -n " - FAILED on $EIBD_BACKEND (url $EIBD_URL) (size $EIBD_BCUADDRTAB) ! "
                    # only fail on usb/FT12 as bcu1 might still be ok
                    if [ "$EIBD_BACKEND" = "bcu1" ]; then
                        EIBD_BCUADDRTAB=0
                    else
                        log_end_msg 2
                        exit 2
                    fi
                fi
            fi
        fi
        if [ "$EIBD_BCUADDRTAB" -gt 0 ]; then 
            echo "Resetting BCU address table length! Old value $EIBD_BCUADDRTAB"
            bcuaddrtab -T 30 -w 0 $EIBD_URL 
        fi
        # fix for broken ABB/BJ USB-If
        USBNAME=`findknxusb | grep ^device | cut -d '(' -f 2,3`
        if [ "$EIBD_BACKEND" = "usb" -a "$USBNAME" = "ABB STOTZ-KONTAKT GmbH:KNX-USB Interface (MDRC))" ]; then 
            echo "ABB-fix: Resetting BCU address table length! Old value $EIBD_BCUADDRTAB"
            bcuaddrtab -T 30 -w 0 $EIBD_URL 
        fi
    fi
    # Concat ARGS
    if [ -n "$EIBD_R" ]; then 
        DAEMON_ARGS=" -R $DAEMON_ARGS"
        EIBD_I=y
    fi
    if [ -n "$EIBD_T" ]; then 
        DAEMON_ARGS=" -T $DAEMON_ARGS"
        EIBD_I=y
    fi
    if [ -n "$EIBD_I" ]; then 
        DAEMON_ARGS=" -S -D -i $DAEMON_ARGS"
    fi
    if [ -n "$EIBD_C" ]; then 
        DAEMON_ARGS=" -c $DAEMON_ARGS"
    fi
    # use -e option to set address
    if [ -n "$EIBD_BACKEND_ADDR" ]; then
        DAEMON_ARGS=" -e $EIBD_BACKEND_ADDR $DAEMON_ARGS"
    fi
    DAEMON_ARGS="$DAEMON_ARGS $EIBD_ADDTL_ARGS $EIBD_URL"
}
#
# Function that starts the daemon/service
#
do_start()
{
    route add 224.0.23.12 dev eth0
    #echo "DEBUG args: $DAEMON_ARGS eibdi: $EIBD_I eibdt: $EIBD_T eibdr: $EIBD_R backend: $EIBD_BACKEND url: $EIBD_URL port: $EIBD_PORT addrtab: $EIBD_BCUADDRTAB"
    # Return
        #   0 if daemon has been started
        #   1 if daemon was already running
        #   2 if daemon could not be started
        start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
                || return 1
        do_init
    echo "*** Starting $DESC: $NAME using $EIBD_URL" 
        start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
                $DAEMON_ARGS \
                || return 2
        # Add code here, if necessary, that waits for the process to be ready
        # to handle requests from services started subsequently which depend
        # on this one.  As a last resort, sleep for some time.
        sleep 2
        chmod a+rw /tmp/eib
}
#
# Function that stops the daemon/service
#
do_stop()
{
        # Return
        #   0 if daemon has been stopped
        #   1 if daemon was already stopped
        #   2 if daemon could not be stopped
        #   other if a failure occurred
        start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
        RETVAL="$?"
        [ "$RETVAL" = 2 ] && return 2
        # Wait for children to finish too if this is a daemon that forks
        # and if the daemon is only ever run from this initscript.
        # If the above conditions are not satisfied then add some other code
        # that waits for the process to drop all resources that could be
        # needed by services started subsequently.  A last resort is to
        # sleep for some time.
        start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
    [ "$?" = 2 ] && return 2
        # Many daemons don't delete their pidfiles when they exit.
        rm -f $PIDFILE
        route delete 224.0.23.12
        return "$RETVAL"
}
#
# Function that sends a SIGHUP to the daemon/service
#
do_reload() {
        #
        # If the daemon can reload its configuration without
        # restarting (for example, when it is sent a SIGHUP),
        # then implement that here.
        #
        start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME
        return 0
}
case "$1" in
  start)
        [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC using $EIBD_URL" "$NAME"
        do_start
        case "$?" in
                0|1) log_end_msg 0 ;;
                2) [ log_end_msg 1 ;;
        esac
        ;;
  stop)
        [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
    echo "*** Stopping $DESC" "$NAME"
        do_stop
        case "$?" in
                0|1) log_end_msg 0 ;;
                2) [ log_end_msg 1 ;;
        esac
        ;;
  #reload|force-reload)
        #
        # If do_reload() is not implemented then leave this commented out
        # and leave 'force-reload' as an alias for 'restart'.
        #
        #log_daemon_msg "Reloading $DESC" "$NAME"
        #do_reload
        #log_end_msg $?
        #;;
  restart|force-reload)
        #
        # If the "reload" option is implemented then remove the
        # 'force-reload' alias
        #
        echo "*** Restarting $DESC" "$NAME"
        do_stop
        case "$?" in
          0|1)
        sleep 2
                do_start
                case "$?" in
                        0) log_end_msg 0 ;;
                        1) log_end_msg 1 ;; # Old process is still running
                        *) log_end_msg 1 ;; # Failed to start
                esac
                ;;
          *)
                # Failed to stop
                log_end_msg 1
                ;;
        esac
        ;;
  *)
        #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
        echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
        exit 3
        ;;
esac
Code:
	
	#! /bin/sh
### BEGIN INIT INFO
# Provides:          linknx
# Required-Start:    $local_fs $remote_fs eibd
# Required-Stop:     $local_fs $remote_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: linknx initscript
# Description:       This file should be used to construct scripts to be
#                    placed in /etc/init.d.
### END INIT INFO
# Author: <mm@elabnet.de>
#
# Please remove the "Author" lines above and replace them
# with your own name if you copy and modify this script.
# Do NOT "set -e"
# PATH should only include /usr/* if it runs after the mountnfs.sh script
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="service"
NAME=linknx
DAEMON=/usr/local/bin/$NAME
PIDFILE=/var/run/$NAME.pid
DAEMON_ARGS="-c/var/lib/linknx/linknx.xml -p $PIDFILE -d/var/log/linknx.log -w"
SCRIPTNAME=/etc/init.d/$NAME
# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0
# Read configuration variable file if it is present
# [ -r /etc/default/$NAME ] && . /etc/default/$NAME
# Temp-fix! remove surrounding whitespaces from seperator '='
[ -r /etc/default/$NAME ] && cat /etc/default/$NAME | sed 's/ =/=/' | sed 's/= /=/' > /etc/default/$NAME.out
[ -r /etc/default/$NAME.out ] && . /etc/default/$NAME.out
# Load the VERBOSE setting and other rcS variables
. /lib/init/vars.sh
# Define LSB log_* functions.
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
. /lib/lsb/init-functions
#
# Function that starts the daemon/service
#
do_start()
{
        # Return
        #   0 if daemon has been started
        #   1 if daemon was already running
        #   2 if daemon could not be started
        start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
                || return 1
        start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
                $DAEMON_ARGS \
                || return 2
        # Add code here, if necessary, that waits for the process to be ready
        # to handle requests from services started subsequently which depend
        # on this one.  As a last resort, sleep for some time.
}
#
# Function that stops the daemon/service
#
do_stop()
{
        # Return
        #   0 if daemon has been stopped
        #   1 if daemon was already stopped
        #   2 if daemon could not be stopped
        #   other if a failure occurred
        start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
        RETVAL="$?"
        [ "$RETVAL" = 2 ] && return 2
        # Wait for children to finish too if this is a daemon that forks
        # and if the daemon is only ever run from this initscript.
        # If the above conditions are not satisfied then add some other code
        # that waits for the process to drop all resources that could be
        # needed by services started subsequently.  A last resort is to
        # sleep for some time.
        start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
        [ "$?" = 2 ] && return 2
        # Many daemons don't delete their pidfiles when they exit.
        rm -f $PIDFILE
        return "$RETVAL"
}
#
# Function that sends a SIGHUP to the daemon/service
#
do_reload() {
        #
        # If the daemon can reload its configuration without
        # restarting (for example, when it is sent a SIGHUP),
        # then implement that here.
        #
        start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME
        return 0
}
case "$1" in
  start)
        [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
        do_start
        case "$?" in
                0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
                2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
        esac
        ;;
  stop)
        [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
        do_stop
        case "$?" in
                0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
                2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
        esac
        ;;
  #reload|force-reload)
        #
        # If do_reload() is not implemented then leave this commented out
        # and leave 'force-reload' as an alias for 'restart'.
        #
        #log_daemon_msg "Reloading $DESC" "$NAME"
        #do_reload
        #log_end_msg $?
        #;;
  restart|force-reload)
        #
        # If the "reload" option is implemented then remove the
        # 'force-reload' alias
        #
        log_daemon_msg "Restarting $DESC" "$NAME"
        do_stop
        case "$?" in
          0|1)
                do_start
                case "$?" in
                    0) log_end_msg 0 ;;
                    1) log_end_msg 1 ;; # Old process is still running
                    *) log_end_msg 1 ;; # Failed to start
                esac
                ;;
          *)
                # Failed to stop
                log_end_msg 1
                ;;
        esac
        ;;
  *)
        #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
        echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
        exit 3
        ;;
esac
:
Code:
	
	update-rc.d eibd defaults update-rc.d linknx defaults
linknx will übrigens eine linknx.xml in /var/lib/linknx.
Dann kommt die CometVisu und der benötigte Webserver, ich habe lighttpd benutzt:
Code:
	
	groupadd www-data apt-get install lighttpd php5-cgi lighttpd-enable-mod cgi fastcgi fastcgi-php
Ausserdem gibt's zumindest bei mir ein Problem mit den cgi's, das ich durch einen edit in /etc/lighttpd/conf-enabled/10-cgi.conf lösen konnte.
Man ergänze den Teil um $HTTP wie folgt:
Code:
	
	$HTTP["url"] =~ "^/cgi-bin/" {
        alias.url       += ( "/cgi-bin/" => "/usr/lib/cgi-bin/" )
        cgi.assign = ( "" => "" )
}
Code:
	
	/etc/init.d/lighthttpd restart
Code:
	
	cd /var/www wget http://downloads.sourceforge.net/project/openautomation/CometVisu/CometVisu_0.6.2.tar.bz2 tar -jxvf CometVisu_0.6.2.tar.bz2 cd release_0.6.2 mv visu /var/www cd .. chown -R www-data:www-data visu
Code:
	
	cd /usr/lib/cgi-bin ln -s /usr/local/bin/eibread-cgi r ln -s /usr/local/bin/eibwrite-cgi w
Code:
	
	#!/bin/sh
echo Content-Type: text/plain
echo
echo "{ \"v\":\"0.0.1\", \"s\":\"SESSION\" }"
Mit einer sinnvoll gefütterten linknx.xml tut's die Logik, und auch die Basis-Funktionen der Visu funktionieren. Mir fehlt noch der ganze rrd-Teil, da muss ich mich mal drangeben.
Ich hatte eine visu_config.xml und eine linknx.xml, die ich von meinem amd64-Server, ebenfalls unter Squeeze, einfach nur rüberkopierte. Auf den ersten Blick fühlt sich der Pi in der Visu nicht wirklich langsamer als der "richtige" PC an.


							
						
Kommentar