wok-current rev 13275

Up netatalk-pam (2.2.3)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Aug 22 22:59:17 2012 +0200 (2012-08-22)
parents de266016c07c
children fbb0f6a5043a
files netatalk-pam/receipt netatalk-pam/stuff/etc/init.d/netatalk
line diff
     1.1 --- a/netatalk-pam/receipt	Wed Aug 22 22:52:48 2012 +0200
     1.2 +++ b/netatalk-pam/receipt	Wed Aug 22 22:59:17 2012 +0200
     1.3 @@ -1,7 +1,7 @@
     1.4  # SliTaz package receipt.
     1.5  
     1.6  PACKAGE="netatalk-pam"
     1.7 -VERSION="2.1.5"
     1.8 +VERSION="2.2.3"
     1.9  CATEGORY="system-tools"
    1.10  SHORT_DESC="The AppleTalk Protocol Suite using PAM."
    1.11  MAINTAINER="pascal.bellard@slitaz.org"
    1.12 @@ -23,18 +23,18 @@
    1.13  	--libexecdir=/usr/lib/netatalk \
    1.14  	--mandir=/usr/share/man $CONFIGURE_ARGS &&
    1.15  	make &&
    1.16 -	make DESTDIR=$PWD/_pkg install
    1.17 +	make DESTDIR=$DESTDIR install
    1.18  }
    1.19  
    1.20  # Rules to gen a SliTaz package suitable for Tazpkg.
    1.21  genpkg_rules()
    1.22  {
    1.23  	mkdir -p $fs/usr/share $fs/usr/lib
    1.24 -	cp -a $_pkg/usr/bin $fs/usr
    1.25 -	cp -a $_pkg/usr/sbin $fs/usr
    1.26 -	cp -a $_pkg/usr/lib/netatalk $fs/usr/lib
    1.27 -	cp -a $_pkg/etc $fs
    1.28 -	cp -a stuff/etc $fs
    1.29 +	cp -a $install/usr/bin $fs/usr
    1.30 +	cp -a $install/usr/sbin $fs/usr
    1.31 +	cp -a $install/usr/lib/netatalk $fs/usr/lib
    1.32 +	cp -a $install/etc $fs
    1.33 +	cp -a $stuff/etc $fs
    1.34  	rm -f $fs/etc/netatalk/uams/*a
    1.35  }
    1.36  
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/netatalk-pam/stuff/etc/init.d/netatalk	Wed Aug 22 22:59:17 2012 +0200
     2.3 @@ -0,0 +1,81 @@
     2.4 +#!/bin/sh
     2.5 +# Start, stop and restart the netatalk deamons on SliTaz, at boot time or 
     2.6 +# with the command line.
     2.7 +#
     2.8 +# To start netatalk 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 +
    2.13 +NAME=atalkd
    2.14 +DESC="netatalk deamons"
    2.15 +PIDFILE=/var/run/$NAME.pid
    2.16 +AFPD_UAMLIST="-U uams_dhx.so,uams_clrtxt.so,uams_randnum.so"
    2.17 +AFPD_GUEST=nobody
    2.18 +AFPD_MAX_CLIENTS=50
    2.19 +ATALK_ZONE=
    2.20 +ATALK_NAME=$(hostname -s)
    2.21 +ATALK_BGROUND=no
    2.22 +
    2.23 +. /etc/netatalk/netatalk.conf
    2.24 +
    2.25 +# Start Netatalk servers.
    2.26 +atalk_startup()
    2.27 +{
    2.28 +	if [ "$ATALKD_RUN" = "yes" ]; then
    2.29 +		modprobe appletalk
    2.30 +		atalkd
    2.31 +		pidof atalkd > $PIDFILE
    2.32 +
    2.33 +		# register workstation
    2.34 +		nbprgstr -p 4 "$ATALK_NAME:Workstation$ATALK_ZONE"
    2.35 +		nbprgstr -p 4 "$ATALK_NAME:netatalk$ATALK_ZONE"
    2.36 +
    2.37 +		[ "$PAPD_RUN" = "yes" ] && papd
    2.38 +		[ "$TIMELORD_RUN" = "yes" ] && timelord
    2.39 +	fi
    2.40 +
    2.41 +	[ "$AFPD_RUN" = "yes" ] && afpd $AFPD_UAMLIST -g $AFPD_GUEST \
    2.42 +    		-c $AFPD_MAX_CLIENTS -n "$ATALK_NAME$ATALK_ZONE"
    2.43 +}
    2.44 +
    2.45 +case "$1" in
    2.46 +start)
    2.47 +	if active_pidfile $PIDFILE $NAME ; then
    2.48 +		echo "$NAME is already running."
    2.49 +		exit 1
    2.50 +	fi
    2.51 +	echo -n "Starting $DESC: $NAME... "
    2.52 +	if [ "$ATALK_BGROUND" == "yes" ]; then
    2.53 +		atalk_startup >/dev/null &
    2.54 +	else
    2.55 +		atalk_startup
    2.56 +	fi
    2.57 +	status
    2.58 +	;;
    2.59 +stop)
    2.60 +	if ! active_pidfile $PIDFILE $NAME ; then
    2.61 +		echo "$NAME is not running."
    2.62 +		exit 1
    2.63 +	fi
    2.64 +	echo -n "Stopping $DESC: $NAME... "
    2.65 +	killall afpd
    2.66 +	killall papd
    2.67 +	killall timelord
    2.68 +	killall atalkd
    2.69 +	status
    2.70 +	;;
    2.71 +restart)
    2.72 +	$0 start
    2.73 +	sleep 2
    2.74 +	$0 stop
    2.75 +	;;
    2.76 +*)
    2.77 +	echo ""
    2.78 +	echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop|restart]"
    2.79 +	echo ""
    2.80 +	exit 1
    2.81 +	;;
    2.82 +esac
    2.83 +
    2.84 +exit 0