wok-current rev 487
Add: lxnetdaemon (go for 448 pkgs...)
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Sat Mar 22 15:13:36 2008 +0100 (2008-03-22) |
parents | 52afed25eb7f |
children | 8f5c3b21b883 |
files | lxnetdaemon/receipt lxnetdaemon/stuff/etc/init.d/lxnetdaemon lxnetdaemon/stuff/lxnetdaemon.conf |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/lxnetdaemon/receipt Sat Mar 22 15:13:36 2008 +0100 1.3 @@ -0,0 +1,34 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="lxnetdaemon" 1.7 +VERSION="0.1.1" 1.8 +CATEGORY="network" 1.9 +SHORT_DESC="Network manager for LXpanel." 1.10 +MAINTAINER="pankso@slitaz.org" 1.11 +TARBALL="$PACKAGE-$VERSION.tar.gz" 1.12 +WEB_SITE="http://lxde.sourceforge.net/" 1.13 +WGET_URL="$SF_MIRROR/lxde/$TARBALL" 1.14 + 1.15 +# Rules to configure and make the package. 1.16 +compile_rules() 1.17 +{ 1.18 + cd $src 1.19 + ./configure \ 1.20 + --prefix=/usr \ 1.21 + $CONFIGURE_ARGS 1.22 + make 1.23 + make DESTDIR=$PWD/_pkg install 1.24 + echo "Continue..." 1.25 +} 1.26 + 1.27 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.28 +genpkg_rules() 1.29 +{ 1.30 + mkdir -p $fs/usr/share 1.31 + cp -a $_pkg/usr/bin $fs/usr 1.32 + cp -a $_pkg/usr/share/$PACKAGE $fs/usr/share 1.33 + chmod +x $fs/usr/share/$PACKAGE/*.sh 1.34 + # Config 1.35 + cp -a stuff/lxnetdaemon.conf $fs/usr/share/lxnetdaemon 1.36 + cp -a stuff/etc $fs 1.37 +}
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/lxnetdaemon/stuff/etc/init.d/lxnetdaemon Sat Mar 22 15:13:36 2008 +0100 2.3 @@ -0,0 +1,56 @@ 2.4 +#!/bin/sh 2.5 +# /etc/init.d/lxnetdaemon: Start, stop and restart LXnetdaemon deamon on 2.6 +# SliTaz, at boot time or with the command line. 2.7 +# 2.8 +# To start daemon at boot time, just put the right name in the $RUN_DAEMONS 2.9 +# variable of /etc/rcS.conf and configure options with /etc/daemons.conf. 2.10 +# 2.11 +. /etc/init.d/rc.functions 2.12 +. /etc/daemons.conf 2.13 + 2.14 +NAME=LXnetdaemon 2.15 +DESC="Network daemon" 2.16 +DAEMON=/usr/bin/lxnetdaemon 2.17 +PIDFILE=/var/run/lxnetdaemon.socket 2.18 + 2.19 +case "$1" in 2.20 + start) 2.21 + if [ -f $PIDFILE ] ; then 2.22 + echo "$NAME already running." 2.23 + exit 1 2.24 + fi 2.25 + echo -n "Starting $DESC: $NAME... " 2.26 + $DAEMON $OPTIONS 2.27 + status 2.28 + ;; 2.29 + stop) 2.30 + if [ ! -f $PIDFILE ] ; then 2.31 + echo "$NAME is not running." 2.32 + exit 1 2.33 + fi 2.34 + echo -n "Stopping $DESC: $NAME... " 2.35 + kill `cat $PIDFILE` 2.36 + rm $PIDFILE 2.37 + status 2.38 + ;; 2.39 + restart) 2.40 + if [ ! -f $PIDFILE ] ; then 2.41 + echo "$NAME is not running." 2.42 + exit 1 2.43 + fi 2.44 + echo -n "Restarting $DESC: $NAME... " 2.45 + kill `cat $PIDFILE` 2.46 + rm $PIDFILE 2.47 + sleep 2 2.48 + $DAEMON $OPTIONS 2.49 + status 2.50 + ;; 2.51 + *) 2.52 + echo "" 2.53 + echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop|restart]" 2.54 + echo "" 2.55 + exit 1 2.56 + ;; 2.57 +esac 2.58 + 2.59 +exit 0
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/lxnetdaemon/stuff/lxnetdaemon.conf Sat Mar 22 15:13:36 2008 +0100 3.3 @@ -0,0 +1,11 @@ 3.4 +# Network Daemon Configuration file 3.5 +[ethernet] 3.6 +up=ifconfig %s up 3.7 +down=ifconfig %s down 3.8 +repair=/usr/share/lxnetdaemon/ethrepair.sh %s 3.9 + 3.10 +[wireless] 3.11 +up=ifconfig %s up 3.12 +down=ifconfig %s down 3.13 +repair=/usr/share/lxnetdaemon/wifirepair.sh %s 3.14 +connect=/usr/share/lxnetdaemon/wificonnect.sh "%s" "%s" %d "%s"