summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Gianelloni <wolf31o2@gentoo.org>2004-01-13 19:02:55 +0000
committerChris Gianelloni <wolf31o2@gentoo.org>2004-01-13 19:02:55 +0000
commitef4ec26c7812644455b43ce3b330806c6eabf2f4 (patch)
tree4ff4f5bc8c6f0ba4b86969c2ce34bc8549c05195 /net-misc/cisco-vpnclient-3des/files
parentadding RESTRICT="nomirror" (diff)
downloadhistorical-ef4ec26c7812644455b43ce3b330806c6eabf2f4.tar.gz
historical-ef4ec26c7812644455b43ce3b330806c6eabf2f4.tar.bz2
historical-ef4ec26c7812644455b43ce3b330806c6eabf2f4.zip
Updated vpnclient init script for proper 2.6 kernel handling and also to remove console messages at boot. Closing Bug #37678.
Diffstat (limited to 'net-misc/cisco-vpnclient-3des/files')
-rw-r--r--net-misc/cisco-vpnclient-3des/files/digest-cisco-vpnclient-3des-4.0.3b-r21
-rw-r--r--net-misc/cisco-vpnclient-3des/files/vpnclient.rc72
2 files changed, 38 insertions, 35 deletions
diff --git a/net-misc/cisco-vpnclient-3des/files/digest-cisco-vpnclient-3des-4.0.3b-r2 b/net-misc/cisco-vpnclient-3des/files/digest-cisco-vpnclient-3des-4.0.3b-r2
new file mode 100644
index 000000000000..ea34c5e4ad2d
--- /dev/null
+++ b/net-misc/cisco-vpnclient-3des/files/digest-cisco-vpnclient-3des-4.0.3b-r2
@@ -0,0 +1 @@
+MD5 0f5cc298818b311b3a2b7cdc7430eda8 vpnclient-linux-4.0.3.B-k9.tar.gz 1326493
diff --git a/net-misc/cisco-vpnclient-3des/files/vpnclient.rc b/net-misc/cisco-vpnclient-3des/files/vpnclient.rc
index d16759afe633..7a2d4ab96124 100644
--- a/net-misc/cisco-vpnclient-3des/files/vpnclient.rc
+++ b/net-misc/cisco-vpnclient-3des/files/vpnclient.rc
@@ -7,42 +7,43 @@ opts="start stop status"
VPNCLIENT="/usr/bin/vpnclient"
VPNDEV="cipsec0"
VPNMOD="cisco_ipsec"
-if [ -x /usr/bin/id ]; then
- ID="/usr/bin/id"
-elif [ -x /bin/id ]; then
- ID="/bin/id"
-else
- echo "Unable to determine access level"
+
+ID="`which id`"
+if [ "$?" != "0" ]; then
+ eerror "Failed: Unable to determine access level (can't find $HILITE id $NORMAL in \$PATH)."
+ unset ID
exit 1
fi
-WHOAMI=`$ID|sed -e 's/(.*//'`
+WHOAMI="`$ID -u`"
depend() {
need net
}
start() {
- ebegin "Starting Cisco VPN Client: "
+ ebegin "Starting Cisco VPN Client"
if [ -f /etc/resolv.conf.vpnbackup ]; then
- echo "restoring /etc/resolv.conf"
+ einfo "restoring /etc/resolv.conf"
mv /etc/resolv.conf.vpnbackup /etc/resolv.conf
fi
- if [ -d /lib/modules/preferred ]; then
- PC=/lib/modules/preferred/CiscoVPN
- else
- PC=/lib/modules/`uname -r`/CiscoVPN
- fi
- if [ -d $PC ] ; then
- /sbin/modprobe -q ${PC}/${VPNMOD}
- if [ "$?" != "0" ] ; then
- echo "Failed to load module ${VPNMOD}"
- exit 1
- fi
- else
- echo "module directory $PC not found."
- exit 1
- fi
+
+ if [ -d /lib/modules/preferred ]; then
+ PC=/lib/modules/preferred/CiscoVPN
+ else
+ PC=/lib/modules/`uname -r`/CiscoVPN
+ fi
+
+ if [ -d $PC ] ; then
+ /sbin/insmod -qs ${PC}/${VPNMOD}
+ if [ "$?" != "0" ] ; then
+ eerror "Failed to load module ${VPNMOD}"
+ exit 1
+ fi
+ else
+ eerror "module directory $PC not found."
+ exit 1
+ fi
case "`uname -r`" in
2.6.*)
;;
@@ -59,14 +60,14 @@ start() {
#
ifconfig $VPNDEV 222.222.222.222 ;
if [ "$?" != "0" ] ; then
- echo "Failed (ifconfig)"
- /sbin/modprobe -qr ${VPNMOD}
+ eerror "Failed (ifconfig)."
+ /sbin/rmmod ${VPNMOD}
exit 1
fi
;;
*)
- echo "Failed (unsupported Linux version)"
- /sbin/modprobe -qr ${VPNMOD}
+ eerror "Failed (unsupported Linux version)."
+ /sbin/rmmod -q ${VPNMOD}
exit 1
;;
esac
@@ -74,23 +75,23 @@ start() {
}
stop() {
- ebegin "Stopping Cisco VPN Client: "
+ ebegin "Stopping Cisco VPN Client"
if [ -x $VPNCLIENT ]; then
$VPNCLIENT disconnect > /dev/null 2>&1
fi
/sbin/lsmod | grep -q "${VPNMOD}"
if [ "$?" != "0" ] ; then
- echo "module ${VPNMOD} is not running."
+ eerror "Failed: module ${VPNMOD} is not running."
exit 1
fi
/sbin/ifconfig $VPNDEV down
if [ "$?" != "0" ] ; then
- echo "Failed (ifconfig)"
+ eerror "Failed (ifconfig)."
exit 1
fi
- /sbin/modprobe -qr ${VPNMOD}
+ /sbin/rmmod ${VPNMOD}
if [ "$?" != "0" ] ; then
- echo "Failed (rmmod)"
+ eerror "Failed (rmmod)."
exit 1
fi
eend $?
@@ -101,13 +102,14 @@ status() {
/sbin/lsmod | egrep "${VPNMOD}"
if [ "$?" != "0" ] ; then
echo
- echo "Status Failed (lsmod ${VPNMOD}) - The VPN module is not loaded."
+ eerror "Failed (lsmod ${VPNMOD}): the VPN module is not loaded."
+ exit 1
fi
echo
/sbin/ifconfig $VPNDEV
if [ "$?" != "0" ] ; then
echo
- echo "Status Failed (ifconfig ${VPNDEV}) - The virtual interface is not present."
+ eerror "Failed (ifconfig ${VPNDEV}): the virtual interface is not present."
exit 1
fi
}