# HG changeset patch # User Christopher Rogers # Date 1318472917 0 # Node ID b8f690d895418dc9b3a70395c020ce1ec60693c7 # Parent 8cbc91d13a1b7a9ce65d73656ddef0a4cc4de9a8 Up: at to 3.1.13. diff -r 8cbc91d13a1b -r b8f690d89541 at/receipt --- a/at/receipt Thu Oct 13 02:13:42 2011 +0000 +++ b/at/receipt Thu Oct 13 02:28:37 2011 +0000 @@ -1,11 +1,11 @@ # SliTaz package receipt. PACKAGE="at" -VERSION="3.1.12" +VERSION="3.1.13" CATEGORY="system-tools" SHORT_DESC="Schedule commands to be executed once." MAINTAINER="pascal.bellard@slitaz.org" -BUILD_DEPENDS="bison flex" +BUILD_DEPENDS="bison flex ssmtp" TARBALL="${PACKAGE}_${VERSION}.orig.tar.gz" WEB_SITE="http://packages.debian.org/lenny/at" WGET_URL="http://ftp.debian.org/debian/pool/main/${PACKAGE:0:1}/$PACKAGE/$TARBALL" @@ -20,16 +20,17 @@ --with-atspool=/var/spool/atd \ --with-jobdir=/var/spool/atd \ $CONFIGURE_ARGS && - make && - make IROOT=$DESTDIR install + make -j1 && + make -j1 IROOT=$DESTDIR install } # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { - mkdir -p $fs/usr + mkdir -p $fs/usr $fs/etc/init.d cp -a $_pkg/usr/bin $fs/usr cp -a $_pkg/usr/sbin $fs/usr cp -a $_pkg/etc $fs cp -a $_pkg/var $fs + cp -a $stuff/atd $fs/etc/init.d } diff -r 8cbc91d13a1b -r b8f690d89541 at/stuff/atd --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/at/stuff/atd Thu Oct 13 02:28:37 2011 +0000 @@ -0,0 +1,58 @@ +#!/bin/sh +# Start, stop and restart a atd 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 + +NAME=$(basename $0) +DESC="$NAME deamon" +DAEMON=$(which $NAME) +eval $(grep -i ^${NAME}_OPTIONS /etc/daemons.conf | sed 's/.*_OPT/OPT/') +PIDFILE=/var/run/$NAME.pid + +case "$1" in + start) + if active_pidfile $PIDFILE $NAME ; then + echo "$NAME is already running." + exit 1 + fi + echo -n "Starting $DESC: $NAME... " + $DAEMON $OPTIONS + [ -f $PIDFILE ] || pidof $NAME | awk '{ print $1 }' > $PIDFILE + active_pidfile $PIDFILE $NAME + status + ;; + stop) + if ! active_pidfile $PIDFILE $NAME ; then + echo "$NAME is not running." + exit 1 + fi + echo -n "Stopping $DESC: $NAME... " + kill `cat $PIDFILE` + status + ;; + restart) + if ! active_pidfile $PIDFILE $NAME ; then + echo "$NAME is not running." + exit 1 + fi + echo -n "Restarting $DESC: $NAME... " + kill `cat $PIDFILE` + sleep 2 + $DAEMON $OPTIONS + [ -f $PIDFILE ] || pidof $NAME | awk '{ print $1 }' > $PIDFILE + active_pidfile $PIDFILE $NAME + status + ;; +*) + echo "" + echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop|restart]" + echo "" + exit 1 + ;; +esac + +exit 0