wok-6.x rev 2188

Add openssh-pam
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Feb 09 09:51:37 2009 +0000 (2009-02-09)
parents e3a0a2a27697
children 938072585546
files openssh-pam/receipt openssh-pam/stuff/openssh openssh/receipt
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/openssh-pam/receipt	Mon Feb 09 09:51:37 2009 +0000
     1.3 @@ -0,0 +1,36 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="openssh-pam"
     1.7 +VERSION="5.0p1"
     1.8 +CATEGORY="security"
     1.9 +SHORT_DESC="Openbsd Secure Shell using PAM."
    1.10 +MAINTAINER="pascal.bellard@slitaz.org"
    1.11 +SOURCE="openssh"
    1.12 +TARBALL="$SOURCE-$VERSION.tar.gz"
    1.13 +WEB_SITE="http://www.openssh.org/"
    1.14 +WGET_URL="ftp://ftp.fr.openbsd.org/pub/OpenBSD/OpenSSH/portable/$TARBALL"
    1.15 +DEPENDS="libcrypto zlib pam"
    1.16 +BUILD_DEPENDS="libcrypto-dev zlib-dev openssl-dev pam pam-dev"
    1.17 +PROVIDE="openssh:pam"
    1.18 +
    1.19 +# Rules to configure and make the package.
    1.20 +compile_rules()
    1.21 +{
    1.22 +	cd $src
    1.23 +	./configure --prefix=/usr --sysconfdir=/etc/ssh --with-pam \
    1.24 +		--with-privsep-user=nobody --with-privsep-path=/var/run/sshd \
    1.25 +		$CONFIGURE_ARGS &&
    1.26 +	make &&
    1.27 +	make DESTDIR=$PWD/_pkg install
    1.28 +}
    1.29 +
    1.30 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.31 +genpkg_rules()
    1.32 +{
    1.33 +	mkdir -p $fs/usr/share $fs/etc/init.d $fs/etc/ssh $fs/var/run/sshd
    1.34 +	cp -a $_pkg/usr/share/Ssh.bin $fs/usr/share
    1.35 +	cp -a $_pkg/usr/sbin $_pkg/usr/bin $_pkg/usr/libexec $fs/usr
    1.36 +	cp -a $_pkg/etc $fs
    1.37 +	cp stuff/openssh $fs/etc/init.d
    1.38 +}
    1.39 +
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/openssh-pam/stuff/openssh	Mon Feb 09 09:51:37 2009 +0000
     2.3 @@ -0,0 +1,64 @@
     2.4 +#!/bin/sh
     2.5 +# /etc/init.d/openssh : Start, stop and restart OpenSSH server on SliTaz, at 
     2.6 +# boot time or with the command line.
     2.7 +#
     2.8 +# To start OpenSSH server at boot time, just put openssh 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=OpenSSH
    2.15 +DESC="OpenSSH server"
    2.16 +DAEMON=/usr/sbin/sshd
    2.17 +OPTIONS=$OPENSSH_OPTIONS
    2.18 +PIDFILE=/var/run/sshd.pid
    2.19 +
    2.20 +case "$1" in
    2.21 +  start)
    2.22 +    # We need rsa and dsa host key file to start dropbear.
    2.23 +    if [ ! -f /etc/ssh/ssh_host_rsa_key ] ; then
    2.24 +      echo "Generating $NAME rsa key... "
    2.25 +      ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -C '' -N ''
    2.26 +    fi
    2.27 +    if [ ! -f /etc/ssh/ssh_host_dsa_key ] ; then
    2.28 +      echo "Generating $NAME dsa key... "
    2.29 +      ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -C '' -N ''
    2.30 +    fi
    2.31 +    if [ -f $PIDFILE ] ; then
    2.32 +      echo "$NAME already running."
    2.33 +      exit 1
    2.34 +    fi
    2.35 +    echo -n "Starting $DESC: $NAME... "
    2.36 +    $DAEMON $OPTIONS
    2.37 +    status
    2.38 +    ;;
    2.39 +  stop)
    2.40 +    if [ ! -f $PIDFILE ] ; then
    2.41 +      echo "$NAME is not running."
    2.42 +      exit 1
    2.43 +    fi
    2.44 +    echo -n "Stopping $DESC: $NAME... "
    2.45 +    kill `cat $PIDFILE`
    2.46 +    status
    2.47 +    ;;
    2.48 +  restart)
    2.49 +    if [ ! -f $PIDFILE ] ; then
    2.50 +      echo "$NAME is not running."
    2.51 +      exit 1
    2.52 +    fi
    2.53 +    echo -n "Restarting $DESC: $NAME... "
    2.54 +    kill `cat $PIDFILE`
    2.55 +    sleep 2
    2.56 +    $DAEMON $OPTIONS
    2.57 +    status
    2.58 +    ;;
    2.59 +  *)
    2.60 +    echo ""
    2.61 +    echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop|restart]"
    2.62 +    echo ""
    2.63 +    exit 1
    2.64 +    ;;
    2.65 +esac
    2.66 +
    2.67 +exit 0
     3.1 --- a/openssh/receipt	Mon Feb 09 09:48:49 2009 +0000
     3.2 +++ b/openssh/receipt	Mon Feb 09 09:51:37 2009 +0000
     3.3 @@ -15,7 +15,7 @@
     3.4  compile_rules()
     3.5  {
     3.6  	cd $src
     3.7 -	./configure --prefix=/usr --sysconfdir=/etc/ssh \
     3.8 +	./configure --prefix=/usr --sysconfdir=/etc/ssh --without-pam \
     3.9  		--with-privsep-user=nobody --with-privsep-path=/var/run/sshd \
    3.10  		$CONFIGURE_ARGS &&
    3.11  	make &&