Sophie

Sophie

distrib > Mandriva > 8.2 > i586 > media > contrib > by-pkgid > 331177f1cf202be42c638edbb206ddef > files > 7

gpppwrap-1.0-3mdk.i586.rpm

#!/bin/sh
if [ -z "$1" ]; then
	echo "mkgpppwrapconf - generate a gpppwrap.conf file from peers scripts"
	echo "USAGE: mkgpppwrapconf peersfiles"
	echo ""
	echo "All output goes to stdout"
	echo "EXAMPLE:"
	echo " mkgpppwrapconf /etc/ppp/peers/* > /etc/ppp/gpppwrap.conf"
	exit 0
fi
echo "# genertated by $0"
echo "# gpppwrap will read the lines with the keyword ppponarg"
echo "# and use the word behind ppponarg as argument for the ppp-on"
echo "# script. A minus sign after ppponarg starts a comment."
echo "#"
for f in $*; do
	if [ -f "$f" ]; then
		if [ -L "$f" ]; then
			# ignore links:
			continue
		fi
		bf=`basename $f`
		echo "# $f"
		info=`grep '# *info' $f | sed -e 's/# *info *//'`
		if [ -n "$info" ]; then
			echo "ppponarg: $bf -- $info"
		else
			echo "ppponarg: $bf"
		fi
	fi
done