# HG changeset patch # User Pascal Bellard # Date 1234173097 0 # Node ID d06bc1bc7ba277574403a971625091c7a7980dad # Parent e3a0a2a27697ca2bca3870123f918708992ba208 Add openssh-pam diff -r e3a0a2a27697 -r d06bc1bc7ba2 openssh-pam/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/openssh-pam/receipt Mon Feb 09 09:51:37 2009 +0000 @@ -0,0 +1,36 @@ +# SliTaz package receipt. + +PACKAGE="openssh-pam" +VERSION="5.0p1" +CATEGORY="security" +SHORT_DESC="Openbsd Secure Shell using PAM." +MAINTAINER="pascal.bellard@slitaz.org" +SOURCE="openssh" +TARBALL="$SOURCE-$VERSION.tar.gz" +WEB_SITE="http://www.openssh.org/" +WGET_URL="ftp://ftp.fr.openbsd.org/pub/OpenBSD/OpenSSH/portable/$TARBALL" +DEPENDS="libcrypto zlib pam" +BUILD_DEPENDS="libcrypto-dev zlib-dev openssl-dev pam pam-dev" +PROVIDE="openssh:pam" + +# Rules to configure and make the package. +compile_rules() +{ + cd $src + ./configure --prefix=/usr --sysconfdir=/etc/ssh --with-pam \ + --with-privsep-user=nobody --with-privsep-path=/var/run/sshd \ + $CONFIGURE_ARGS && + make && + make DESTDIR=$PWD/_pkg install +} + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + mkdir -p $fs/usr/share $fs/etc/init.d $fs/etc/ssh $fs/var/run/sshd + cp -a $_pkg/usr/share/Ssh.bin $fs/usr/share + cp -a $_pkg/usr/sbin $_pkg/usr/bin $_pkg/usr/libexec $fs/usr + cp -a $_pkg/etc $fs + cp stuff/openssh $fs/etc/init.d +} + diff -r e3a0a2a27697 -r d06bc1bc7ba2 openssh-pam/stuff/openssh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/openssh-pam/stuff/openssh Mon Feb 09 09:51:37 2009 +0000 @@ -0,0 +1,64 @@ +#!/bin/sh +# /etc/init.d/openssh : Start, stop and restart OpenSSH server on SliTaz, at +# boot time or with the command line. +# +# To start OpenSSH server at boot time, just put openssh 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=OpenSSH +DESC="OpenSSH server" +DAEMON=/usr/sbin/sshd +OPTIONS=$OPENSSH_OPTIONS +PIDFILE=/var/run/sshd.pid + +case "$1" in + start) + # We need rsa and dsa host key file to start dropbear. + if [ ! -f /etc/ssh/ssh_host_rsa_key ] ; then + echo "Generating $NAME rsa key... " + ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -C '' -N '' + fi + if [ ! -f /etc/ssh/ssh_host_dsa_key ] ; then + echo "Generating $NAME dsa key... " + ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -C '' -N '' + fi + 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` + status + ;; + restart) + if [ ! -f $PIDFILE ] ; then + echo "$NAME is not running." + exit 1 + fi + echo -n "Restarting $DESC: $NAME... " + kill `cat $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 e3a0a2a27697 -r d06bc1bc7ba2 openssh/receipt --- a/openssh/receipt Mon Feb 09 09:48:49 2009 +0000 +++ b/openssh/receipt Mon Feb 09 09:51:37 2009 +0000 @@ -15,7 +15,7 @@ compile_rules() { cd $src - ./configure --prefix=/usr --sysconfdir=/etc/ssh \ + ./configure --prefix=/usr --sysconfdir=/etc/ssh --without-pam \ --with-privsep-user=nobody --with-privsep-path=/var/run/sshd \ $CONFIGURE_ARGS && make &&