[Comm] XISP + Junior 2.2 = problems

Artem Vakhitov =?iso-8859-1?q?temcat_=CE=C1_mail=2Eru?=
Пт Июн 20 19:31:22 MSD 2003


Всем привет,

а не пользуется ли кто XISP в Ю2.2? У меня она дозванивается, но
далее ничего не происходит, IP-адрес не назначается. По всей
видимости, не запускается ip-up, а даже когда и запускается,
ему не передается параметр ipparam, без которого этот скрипт
завершает работу. KPPP работает нормально, а эта же самая версия
XISP у меня без проблем функционировала в Ю2.0.

Ниже привожу отрывок из Xsession-errors, который, возможно,
наведет на какие-то размышления, а также скрипт ip-up полностью.

Xsession-errors:

*****************************************************
n parent: pppd pid 9705
Couldn't find interface ppp0: No such device
Couldn't find interface ppp0: No such device
Couldn't find interface ppp0: No such device
Couldn't find interface ppp0: No such device
Kernel supports ppp alright.
Couldn't find interface ppp0: No such device
Opener: received OpenResolv
Opener: received RemoveSecret
Opener: received RemoveSecret
Opener: received KillPPPDaemon
In killpppd(): Sending SIGTERM to 9705
Opener: received RemoveSecret
Opener: received RemoveSecret
Opener: received OpenResolv
Opener: received OpenResolv
Opener: received RemoveLock
It was pppd that died
pppd exited with return value 5
*******************************************************


Теперь ip-up от XISP:

*******************************************************
#! /bin/sh
#
#  Copyright (C) 1997-2002  Dimitrios P. Bouras
#
#   This program is free software; you can redistribute it and/or modify
#   it under the terms of the GNU General Public License as published by
#   the Free Software Foundation; either version 2 of the License, or
#   (at your option) any later version.
#
#   This program is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#   GNU General Public License for more details.
#
#   You should have received a copy of the GNU General Public License
#   along with this program; if not, write to the Free Software
#   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
#   For author contact information, look in the README file.

# The following paths are adjusted automatically by 'make install'
#------------------------------------------------------------------
NetGroup=__XISPGROUP
XispID=__XISPID

# First setup all variables passed on from pppd
#-----------------------------------------------
interface=$1
device=$2
speed=$3
localIP=$4
remoteIP=$5

# Вот этот-то ipparam и не передавался, когда ip-up все-таки
запускался
ipparam=$6

# Bail out if no ipparam
#------------------------
if [ "$ipparam"x = x ]; then
	exit 0
fi

# Then parse the ipparam argument string passed on from xisp
#------------------------------------------------------------
pipefname=`echo $ipparam | sed -e 's/\:.*$//'`
temp=`echo $ipparam | sed -e 's/^[^:]*\://'`
ISPname=`echo $temp | sed -e 's/\:.*$//'`
temp=`echo $temp | sed -e 's/^[^:]*\://'`
if [ "$DNS1"x = x ]; then					# we don't want to clobber
	DNS1=`echo $temp | sed -e 's/\:.*$//'`	# peer-assigned DNS servers
	xispDNS1=1								# keep track of server(s) added
else										# by pppd versus servers added
	xispDNS1=0								# by xisp in order to know what
fi											# to do further down
temp=`echo $temp | sed -e 's/^[^:]*\://'`
if [ "$DNS2"x = x ]; then
	DNS2=`echo $temp | sed -e 's/\:.*$//'`
	xispDNS2=1
else
	xispDNS2=0
fi
domain=`echo $temp | sed -e 's/^.*\://'`

# Make sure that the user who started pppd is indeed a member of $NetGroup
# If not, then this is most probably a system security attack, so bail out
# Also run xispid security checks on the named-pipe file name and modes
#--------------------------------------------------------------------------
userOK=0
for gname in `$XispID -rGn`; do
	if [ "$gname" = "$NetGroup" ]; then
		userOK=1
	fi
done
if [ $userOK -eq 1 ]; then
	if ! `$XispID -c $pipefname`; then
		exit 0
	fi
else
	exit 0
fi

# The following command redirects all stdout/stderr output (from this
# script or from any command run within it) to the xisp browser window
#----------------------------------------------------------------------
exec 1>>$pipefname 2>&1

# Insert lines in /etc/resolv.conf for the DNS entries passed from
# xisp or from pppd (via the "usepeerdns" option, as returned from
# our peer) at the beginning of the resolver configuration file
#------------------------------------------------------------------
umask 022
if [ "$DNS1"x != x ]; then
	if [ $xispDNS1 -eq 1 ]; then
		echo "nameserver $DNS1 # xisp primary DNS" > /etc/resolv.conf.new
	else
		echo "nameserver $DNS1 # peer-assigned DNS1" > /etc/resolv.conf.new
	fi
	echo "Primary DNS: $DNS1"
fi
if [ "$DNS2"x != x ]; then
	if [ "$DNS2" != "$DNS1" ]; then
		if [ $xispDNS2 -eq 1 ]; then
			echo "nameserver $DNS2 # xisp secondary DNS" >> /etc/resolv.conf.new
		else
			echo "nameserver $DNS2 # peer-assigned DNS2" >> /etc/resolv.conf.new
		fi
		echo "Secondary DNS: $DNS2"
	fi
fi

# Now append current resolver configuration
#-------------------------------------------
if [ "$DNS1"x != x -o "$DNS2"x != x ]; then
	cat /etc/resolv.conf >> /etc/resolv.conf.new
fi

# Add line for domain name in /etc/resolv.conf as passed from
# xisp; this is done last so that it will override any local
# "domain" line currently in the resolver configuration file
#-------------------------------------------------------------
if [ "$domain"x != x ]; then
	echo "domain $domain # xisp domain line" >> /etc/resolv.conf.new
	echo "Domain: $domain"
fi

# Now replace the file and restart nscd if it was running
#---------------------------------------------------------
if [ "$DNS1"x != x -o "$DNS2"x != x ]; then
	mv -f /etc/resolv.conf.new /etc/resolv.conf
	if [ -x /etc/init.d/nscd ]; then
		NSCD=/etc/init.d/nscd;
	elif [ -x /etc/rc.d/nscd ]; then
		NSCD=/etc/rc.d/nscd;
	elif [ -x /etc/rc.d/init.d/nscd ]; then
		NSCD=/etc/rc.d/init.d/nscd;
	else
		NSCD=''
	fi
	if [ "$NSCD"x != x ]; then
		if [ -x $NSCD ]; then
			if $NSCD stop > /dev/null 2>&1; then
				sleep 1
				$NSCD start > /dev/null 2>&1
				echo "Restarted nscd"
			fi
		fi
	fi
fi

# The ISPname variable can now be used to carry out global and/or
# ISP-specific tasks like downloading mail and/or news. The folowing
# statements are examples. Modify them to best suit your needs.
#--------------------------------------------------------------------

# echo "Interface $interface is now UP"
# echo "On $device at $speed Baud"
# echo "Local IP: $localIP"
# echo "Remote IP: $remoteIP"

case $ISPname in

	'My First Provider')
		echo "Provider 1"
		;;

	'My Second Provider')
		echo "Provider 2"
		;;

	*)
		;;
esac

********************************************************

Буду благодарен за помощь. Просьба не советовать забить на XISP,
поскольку в Ю2.0 у меня все было нормально, хочется и в 2.2
настроить...

С уважением,
Артем Вахитов


Подробная информация о списке рассылки community