[Frugalware-darcs] frugalware-current: openssh-4.6p1-5-i686

VMiklos vmiklos at frugalware.org
Fri Jun 15 01:37:31 CEST 2007


Darcsweb-Url: http://darcs.frugalware.org/darcsweb/darcsweb.cgi?r=frugalware-current;a=darcs_commitdiff;h=20070614231910-e2957-7ed217ec84759f070b54b079625caf05b8e18a9d.gz;

[openssh-4.6p1-5-i686
VMiklos <vmiklos at frugalware.org>**20070614231910
 added rc.tunnel and sysconfig/tunnel
] {
hunk ./source/network/openssh/FrugalBuild 7
-pkgrel=4
+pkgrel=5
hunk ./source/network/openssh/FrugalBuild 10
-backup=('etc/ssh/ssh_config' 'etc/ssh/sshd_config')
+backup=('etc/ssh/ssh_config' 'etc/ssh/sshd_config' 'etc/sysconfig/tunnel')
hunk ./source/network/openssh/FrugalBuild 18
-	rc.sshd rc.sshd-{hu,de}.po)
-signatures=("$source.asc" '' '' '' '')
+	rc.sshd rc.sshd-{hu,de}.po \
+	rc.tunnel tunnel)
+signatures=("$source.asc" '' '' '' '' '' '')
hunk ./source/network/openssh/FrugalBuild 38
+	Frcd2 tunnel
+	Fexe /etc/sysconfig/tunnel
addfile ./source/network/openssh/rc.tunnel
hunk ./source/network/openssh/rc.tunnel 1
+#!/bin/bash
+
+# (c) 2007 Miklos Vajna <vmiklos at frugalware.org>
+# rc.tunnel for Frugalware
+# distributed under GPL License
+
+# chkconfig: 2345 44 56
+# description: Manage UML machines
+
+source /lib/initscripts/functions
+TEXTDOMAINDIR=/lib/initscripts/functions
+TEXTDOMAIN=tunnel
+
+actions=(restart start status stop)
+daemon=$"OpenSSH Tunnels"
+
+pid="cat /var/run/tunnel0.pid 2> /dev/null"
+
+rc_start()
+{
+	start_msg
+	if [[ "$(eval ${pid})" == "" ]] ; then
+		source /etc/sysconfig/tunnel
+		num=0
+		for i in "${tunnels[@]}"
+		do
+			ssh $i 'while true; do echo -n .;sleep 5m; done' &> /var/log/tunnel$num.log &
+			echo $! > /var/run/tunnel$num.pid
+			num=$(($num+1))
+		done
+		ok $?
+	else
+		ok 999
+	fi
+}
+
+rc_stop()
+{
+	stop_msg
+	if [[ "$(eval ${pid})" != "" ]] ; then
+		for i in /var/run/tunnel*.pid
+		do
+			[ -n "`cat $i`" ] && kill `cat $i`
+			rm -f $i
+		done
+		ok $?
+	else
+		ok 999
+	fi
+}
+
+rc_exec $1
+
+# vim: ft=sh
addfile ./source/network/openssh/tunnel
hunk ./source/network/openssh/tunnel 1
+#
+# /etc/sysconfig/tunnel
+#
+# confiugation file for openssh tunnels
+#
+
+# tunnels to start/stop
+
+tunneles=()
+
+# example #1: access server.com:customport
+# - use compression
+# - sshd running on port 1022
+# - use login name user
+# - use local port 5901
+# - use remote port 5901
+# - remote machine is server.com
+# this way you can access a server.com:5901 at localhost:5902 if it's not
+# accessible directly from localhost
+#tunnels=(${tunnels[@]} "-C -p 1022 -l user -L5901:localhost:5901 server.com")
+
+# example #2: access server.com from ssh.server.com
+# - use login name user
+# - local port is 8000
+# - remote machine is server.com
+# - remote port is 80
+# - the gateway machine is ssh.server.com
+# this way you can access server.com:80 at localhost:8000 if it's accessible
+# from ssh.server.com but not from localhost
+#tunnels=(${tunnels[@]} "-l user -L 8000:server.com:80 ssh.server.com")
+
+# vim: ft=sh
}


More information about the Frugalware-darcs mailing list