# HG changeset patch # User Christophe Lincoln # Date 1206195216 -3600 # Node ID 2dfe82a2e117d20a6bc7560003370c2cb737648b # Parent 52afed25eb7fdd8a04cd89da6efdc9778d75ef28 Add: lxnetdaemon (go for 448 pkgs...) diff -r 52afed25eb7f -r 2dfe82a2e117 lxnetdaemon/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lxnetdaemon/receipt Sat Mar 22 15:13:36 2008 +0100 @@ -0,0 +1,34 @@ +# SliTaz package receipt. + +PACKAGE="lxnetdaemon" +VERSION="0.1.1" +CATEGORY="network" +SHORT_DESC="Network manager for LXpanel." +MAINTAINER="pankso@slitaz.org" +TARBALL="$PACKAGE-$VERSION.tar.gz" +WEB_SITE="http://lxde.sourceforge.net/" +WGET_URL="$SF_MIRROR/lxde/$TARBALL" + +# Rules to configure and make the package. +compile_rules() +{ + cd $src + ./configure \ + --prefix=/usr \ + $CONFIGURE_ARGS + make + make DESTDIR=$PWD/_pkg install + echo "Continue..." +} + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + mkdir -p $fs/usr/share + cp -a $_pkg/usr/bin $fs/usr + cp -a $_pkg/usr/share/$PACKAGE $fs/usr/share + chmod +x $fs/usr/share/$PACKAGE/*.sh + # Config + cp -a stuff/lxnetdaemon.conf $fs/usr/share/lxnetdaemon + cp -a stuff/etc $fs +} diff -r 52afed25eb7f -r 2dfe82a2e117 lxnetdaemon/stuff/etc/init.d/lxnetdaemon --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lxnetdaemon/stuff/etc/init.d/lxnetdaemon Sat Mar 22 15:13:36 2008 +0100 @@ -0,0 +1,56 @@ +#!/bin/sh +# /etc/init.d/lxnetdaemon: Start, stop and restart LXnetdaemon deamon on +# SliTaz, at boot time or with the command line. +# +# To start daemon at boot time, just put the right name in the $RUN_DAEMONS +# variable of /etc/rcS.conf and configure options with /etc/daemons.conf. +# +. /etc/init.d/rc.functions +. /etc/daemons.conf + +NAME=LXnetdaemon +DESC="Network daemon" +DAEMON=/usr/bin/lxnetdaemon +PIDFILE=/var/run/lxnetdaemon.socket + +case "$1" in + start) + if [ -f $PIDFILE ] ; then + echo "$NAME already running." + exit 1 + fi + echo -n "Starting $DESC: $NAME... " + $DAEMON $OPTIONS + status + ;; + stop) + if [ ! -f $PIDFILE ] ; then + echo "$NAME is not running." + exit 1 + fi + echo -n "Stopping $DESC: $NAME... " + kill `cat $PIDFILE` + rm $PIDFILE + status + ;; + restart) + if [ ! -f $PIDFILE ] ; then + echo "$NAME is not running." + exit 1 + fi + echo -n "Restarting $DESC: $NAME... " + kill `cat $PIDFILE` + rm $PIDFILE + sleep 2 + $DAEMON $OPTIONS + status + ;; + *) + echo "" + echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop|restart]" + echo "" + exit 1 + ;; +esac + +exit 0 diff -r 52afed25eb7f -r 2dfe82a2e117 lxnetdaemon/stuff/lxnetdaemon.conf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lxnetdaemon/stuff/lxnetdaemon.conf Sat Mar 22 15:13:36 2008 +0100 @@ -0,0 +1,11 @@ +# Network Daemon Configuration file +[ethernet] +up=ifconfig %s up +down=ifconfig %s down +repair=/usr/share/lxnetdaemon/ethrepair.sh %s + +[wireless] +up=ifconfig %s up +down=ifconfig %s down +repair=/usr/share/lxnetdaemon/wifirepair.sh %s +connect=/usr/share/lxnetdaemon/wificonnect.sh "%s" "%s" %d "%s"