Mailing List Archive

svn commit: vpnc r482 - /branches/vpnc-nortel/vpnc-script.in /trunk/vpnc-script.in
Author: Antonio Borneo
Date: Sat Jan 14 08:54:09 2012
New Revision: 482

Log:
vpnc-script.in for Suse Linux pre 11.1

Pass same parameter -s to modify_resolvconf on
"modify" and "restore".
Fix $SCRIPTNAME to current name of script.

Modified:
branches/vpnc-nortel/vpnc-script.in
trunk/vpnc-script.in

Modified: branches/vpnc-nortel/vpnc-script.in
==============================================================================
--- branches/vpnc-nortel/vpnc-script.in (original)
+++ branches/vpnc-nortel/vpnc-script.in Sat Jan 14 08:54:09 2012
@@ -50,8 +50,7 @@

DEFAULT_ROUTE_FILE=/var/run/vpnc/defaultroute
RESOLV_CONF_BACKUP=/var/run/vpnc/resolv.conf-backup
-FULL_SCRIPTNAME=@PREFIX@/sbin/vpnc
-SCRIPTNAME=`basename $FULL_SCRIPTNAME`
+SCRIPTNAME=`basename $0`

# some systems, eg. Darwin & FreeBSD, prune /var/run on boot
if [ ! -d "/var/run/vpnc" ]; then
@@ -352,15 +351,17 @@

modify_resolvconf_suse()
{
+ FULL_SCRIPTNAME=`readlink -f $0`
RESOLV_OPTS=''
test -n "$INTERNAL_IP4_DNS" && RESOLV_OPTS="-n \"$INTERNAL_IP4_DNS\""
test -n "$CISCO_DEF_DOMAIN" && RESOLV_OPTS="$RESOLV_OPTS -d $CISCO_DEF_DOMAIN"
- test -n "$RESOLV_OPTS" && eval /sbin/modify_resolvconf modify -s $SCRIPTNAME -p $SCRIPTNAME -f $FULL_SCRIPTNAME -e $TUNDEV $RESOLV_OPTS -t \"This file was created by $SCRIPTNAME\"
+ test -n "$RESOLV_OPTS" && eval /sbin/modify_resolvconf modify -s vpnc -p $SCRIPTNAME -f $FULL_SCRIPTNAME -e $TUNDEV $RESOLV_OPTS -t \"This file was created by $SCRIPTNAME\"
}

# Restore resolv.conf to old contents on Suse
restore_resolvconf_suse()
{
+ FULL_SCRIPTNAME=`readlink -f $0`
/sbin/modify_resolvconf restore -s vpnc -p $SCRIPTNAME -f $FULL_SCRIPTNAME -e $TUNDEV
}


Modified: trunk/vpnc-script.in
==============================================================================
--- trunk/vpnc-script.in (original)
+++ trunk/vpnc-script.in Sat Jan 14 08:54:09 2012
@@ -50,8 +50,7 @@

DEFAULT_ROUTE_FILE=/var/run/vpnc/defaultroute
RESOLV_CONF_BACKUP=/var/run/vpnc/resolv.conf-backup
-FULL_SCRIPTNAME=@PREFIX@/sbin/vpnc
-SCRIPTNAME=`basename $FULL_SCRIPTNAME`
+SCRIPTNAME=`basename $0`

# some systems, eg. Darwin & FreeBSD, prune /var/run on boot
if [ ! -d "/var/run/vpnc" ]; then
@@ -352,15 +351,17 @@

modify_resolvconf_suse()
{
+ FULL_SCRIPTNAME=`readlink -f $0`
RESOLV_OPTS=''
test -n "$INTERNAL_IP4_DNS" && RESOLV_OPTS="-n \"$INTERNAL_IP4_DNS\""
test -n "$CISCO_DEF_DOMAIN" && RESOLV_OPTS="$RESOLV_OPTS -d $CISCO_DEF_DOMAIN"
- test -n "$RESOLV_OPTS" && eval /sbin/modify_resolvconf modify -s $SCRIPTNAME -p $SCRIPTNAME -f $FULL_SCRIPTNAME -e $TUNDEV $RESOLV_OPTS -t \"This file was created by $SCRIPTNAME\"
+ test -n "$RESOLV_OPTS" && eval /sbin/modify_resolvconf modify -s vpnc -p $SCRIPTNAME -f $FULL_SCRIPTNAME -e $TUNDEV $RESOLV_OPTS -t \"This file was created by $SCRIPTNAME\"
}

# Restore resolv.conf to old contents on Suse
restore_resolvconf_suse()
{
+ FULL_SCRIPTNAME=`readlink -f $0`
/sbin/modify_resolvconf restore -s vpnc -p $SCRIPTNAME -f $FULL_SCRIPTNAME -e $TUNDEV
}


_______________________________________________
vpnc-devel mailing list
vpnc-devel@unix-ag.uni-kl.de
https://lists.unix-ag.uni-kl.de/mailman/listinfo/vpnc-devel
http://www.unix-ag.uni-kl.de/~massar/vpnc/