aboutsummaryrefslogtreecommitdiff
path: root/src/pt
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-01-18 12:47:52 +0000
committerChristian Grothoff <christian@grothoff.org>2012-01-18 12:47:52 +0000
commiteaed2cc24c95f9c6188182b1373459d0855015b1 (patch)
treea0ecbba0ea5e5c3eecb19a53df7145597fb11fbd /src/pt
parent6bdc9878c8027ca7e6c4fca5410d7569cea6fe12 (diff)
downloadgnunet-eaed2cc24c95f9c6188182b1373459d0855015b1.tar.gz
gnunet-eaed2cc24c95f9c6188182b1373459d0855015b1.zip
-fixing #2082 -- allow iptables/ip/sysctl to also be in /usr/sbin
Diffstat (limited to 'src/pt')
-rwxr-xr-xsrc/pt/gnunet-daemon-pt136
1 files changed, 108 insertions, 28 deletions
diff --git a/src/pt/gnunet-daemon-pt b/src/pt/gnunet-daemon-pt
index 84ebead21..e57ea8f4d 100755
--- a/src/pt/gnunet-daemon-pt
+++ b/src/pt/gnunet-daemon-pt
@@ -1,7 +1,7 @@
1#! /bin/bash 1#! /bin/bash
2 2
3# gnunet-daemon-pt - temporary wrapper script for .libs/gnunet-daemon-pt 3# gnunet-daemon-pt - temporary wrapper script for .libs/gnunet-daemon-pt
4# Generated by ltmain.sh (GNU libtool) 2.2.6b Debian-2.2.6b-2 4# Generated by libtool (GNU libtool) 2.4.2 Debian-2.4.2-1
5# 5#
6# The gnunet-daemon-pt program cannot be directly executed until all the libtool 6# The gnunet-daemon-pt program cannot be directly executed until all the libtool
7# libraries that it depends on are installed. 7# libraries that it depends on are installed.
@@ -11,7 +11,6 @@
11 11
12# Sed substitution that helps us do robust quoting. It backslashifies 12# Sed substitution that helps us do robust quoting. It backslashifies
13# metacharacters that are still active within double-quoted strings. 13# metacharacters that are still active within double-quoted strings.
14Xsed='/bin/sed -e 1s/^X//'
15sed_quote_subst='s/\([`"$\\]\)/\\\1/g' 14sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
16 15
17# Be Bourne compatible 16# Be Bourne compatible
@@ -32,39 +31,125 @@ DUALCASE=1; export DUALCASE # for MKS sh
32# if CDPATH is set. 31# if CDPATH is set.
33(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 32(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
34 33
35relink_command="(cd /home/grothoff/svn/gnunet/src/pt; { test -z \"\${LIBRARY_PATH+set}\" || unset LIBRARY_PATH || { LIBRARY_PATH=; export LIBRARY_PATH; }; }; { test -z \"\${COMPILER_PATH+set}\" || unset COMPILER_PATH || { COMPILER_PATH=; export COMPILER_PATH; }; }; { test -z \"\${GCC_EXEC_PREFIX+set}\" || unset GCC_EXEC_PREFIX || { GCC_EXEC_PREFIX=; export GCC_EXEC_PREFIX; }; }; { test -z \"\${LD_RUN_PATH+set}\" || unset LD_RUN_PATH || { LD_RUN_PATH=; export LD_RUN_PATH; }; }; LD_LIBRARY_PATH=/usr/lib/debug:/home/grothoff/lib; export LD_LIBRARY_PATH; PATH=/opt/jdk1.6.0_22/bin:/usr/lib/jvm/java-6-sun//bin:.:/home/grothoff/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games; export PATH; gcc -fno-strict-aliasing -Wall -g -Wall -Werror -O0 -I/home/grothoff//include -o \$progdir/\$file gnunet-daemon-pt.o -L/home/grothoff//lib ../../src/vpn/.libs/libgnunetvpn.so ../../src/dns/.libs/libgnunetdns.so ../../src/dns/.libs/libgnunetdnsparser.so ../../src/statistics/.libs/libgnunetstatistics.so ../../src/util/.libs/libgnunetutil.so ../../src/mesh/.libs/libgnunetmesh.so -ldl -Wl,-rpath -Wl,/home/grothoff/svn/gnunet/src/vpn/.libs -Wl,-rpath -Wl,/home/grothoff/svn/gnunet/src/dns/.libs -Wl,-rpath -Wl,/home/grothoff/svn/gnunet/src/statistics/.libs -Wl,-rpath -Wl,/home/grothoff/svn/gnunet/src/util/.libs -Wl,-rpath -Wl,/home/grothoff/svn/gnunet/src/mesh/.libs -Wl,-rpath -Wl,/home/grothoff/lib)" 34relink_command="(cd /home/grothoff/svn/gnunet/src/pt; { test -z \"\${LIBRARY_PATH+set}\" || unset LIBRARY_PATH || { LIBRARY_PATH=; export LIBRARY_PATH; }; }; { test -z \"\${COMPILER_PATH+set}\" || unset COMPILER_PATH || { COMPILER_PATH=; export COMPILER_PATH; }; }; { test -z \"\${GCC_EXEC_PREFIX+set}\" || unset GCC_EXEC_PREFIX || { GCC_EXEC_PREFIX=; export GCC_EXEC_PREFIX; }; }; { test -z \"\${LD_RUN_PATH+set}\" || unset LD_RUN_PATH || { LD_RUN_PATH=; export LD_RUN_PATH; }; }; LD_LIBRARY_PATH=/home/grothoff/lib; export LD_LIBRARY_PATH; PATH=/opt/jdk1.6.0_22/bin/:/home/grothoff/bin/:/usr/local/bin:/usr/bin:/bin:/usr/games:.; export PATH; gcc -fno-strict-aliasing -Wall -g -O0 -Wall -o \$progdir/\$file gnunet-daemon-pt.o -L/home/grothoff//lib ../../src/vpn/.libs/libgnunetvpn.so ../../src/dns/.libs/libgnunetdns.so ../../src/dns/.libs/libgnunetdnsparser.so ../../src/statistics/.libs/libgnunetstatistics.so ../../src/util/.libs/libgnunetutil.so ../../src/mesh/.libs/libgnunetmesh.so -lm -ldl -Wl,-rpath -Wl,/home/grothoff/svn/gnunet/src/vpn/.libs -Wl,-rpath -Wl,/home/grothoff/svn/gnunet/src/dns/.libs -Wl,-rpath -Wl,/home/grothoff/svn/gnunet/src/statistics/.libs -Wl,-rpath -Wl,/home/grothoff/svn/gnunet/src/util/.libs -Wl,-rpath -Wl,/home/grothoff/svn/gnunet/src/mesh/.libs -Wl,-rpath -Wl,/home/grothoff/lib)"
36 35
37# This environment variable determines our operation mode. 36# This environment variable determines our operation mode.
38if test "$libtool_install_magic" = "%%%MAGIC variable%%%"; then 37if test "$libtool_install_magic" = "%%%MAGIC variable%%%"; then
39 # install mode needs the following variables: 38 # install mode needs the following variables:
40 generated_by_libtool_version='2.2.6b' 39 generated_by_libtool_version='2.4.2'
41 notinst_deplibs=' ../../src/vpn/libgnunetvpn.la ../../src/dns/libgnunetdns.la ../../src/dns/libgnunetdnsparser.la ../../src/statistics/libgnunetstatistics.la ../../src/util/libgnunetutil.la ../../src/mesh/libgnunetmesh.la' 40 notinst_deplibs=' ../../src/vpn/libgnunetvpn.la ../../src/dns/libgnunetdns.la ../../src/dns/libgnunetdnsparser.la ../../src/statistics/libgnunetstatistics.la ../../src/util/libgnunetutil.la ../../src/mesh/libgnunetmesh.la'
42else 41else
43 # When we are sourced in execute mode, $file and $ECHO are already set. 42 # When we are sourced in execute mode, $file and $ECHO are already set.
44 if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then 43 if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then
45 ECHO="echo"
46 file="$0" 44 file="$0"
47 # Make sure echo works. 45
48 if test "X$1" = X--no-reexec; then 46# A function that is used when there is no print builtin or printf.
49 # Discard the --no-reexec flag, and continue. 47func_fallback_echo ()
50 shift 48{
51 elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then 49 eval 'cat <<_LTECHO_EOF
52 # Yippee, $ECHO works! 50$1
53 : 51_LTECHO_EOF'
54 else 52}
55 # Restart under the correct shell, and then maybe $ECHO will work. 53 ECHO="printf %s\\n"
56 exec /bin/bash "$0" --no-reexec ${1+"$@"} 54 fi
57 fi 55
56# Very basic option parsing. These options are (a) specific to
57# the libtool wrapper, (b) are identical between the wrapper
58# /script/ and the wrapper /executable/ which is used only on
59# windows platforms, and (c) all begin with the string --lt-
60# (application programs are unlikely to have options which match
61# this pattern).
62#
63# There are only two supported options: --lt-debug and
64# --lt-dump-script. There is, deliberately, no --lt-help.
65#
66# The first argument to this parsing function should be the
67# script's ../../libtool value, followed by no.
68lt_option_debug=
69func_parse_lt_options ()
70{
71 lt_script_arg0=$0
72 shift
73 for lt_opt
74 do
75 case "$lt_opt" in
76 --lt-debug) lt_option_debug=1 ;;
77 --lt-dump-script)
78 lt_dump_D=`$ECHO "X$lt_script_arg0" | /bin/sed -e 's/^X//' -e 's%/[^/]*$%%'`
79 test "X$lt_dump_D" = "X$lt_script_arg0" && lt_dump_D=.
80 lt_dump_F=`$ECHO "X$lt_script_arg0" | /bin/sed -e 's/^X//' -e 's%^.*/%%'`
81 cat "$lt_dump_D/$lt_dump_F"
82 exit 0
83 ;;
84 --lt-*)
85 $ECHO "Unrecognized --lt- option: '$lt_opt'" 1>&2
86 exit 1
87 ;;
88 esac
89 done
90
91 # Print the debug banner immediately:
92 if test -n "$lt_option_debug"; then
93 echo "gnunet-daemon-pt:gnunet-daemon-pt:${LINENO}: libtool wrapper (GNU libtool) 2.4.2 Debian-2.4.2-1" 1>&2
58 fi 94 fi
95}
96
97# Used when --lt-debug. Prints its arguments to stdout
98# (redirection is the responsibility of the caller)
99func_lt_dump_args ()
100{
101 lt_dump_args_N=1;
102 for lt_arg
103 do
104 $ECHO "gnunet-daemon-pt:gnunet-daemon-pt:${LINENO}: newargv[$lt_dump_args_N]: $lt_arg"
105 lt_dump_args_N=`expr $lt_dump_args_N + 1`
106 done
107}
108
109# Core function for launching the target application
110func_exec_program_core ()
111{
112
113 if test -n "$lt_option_debug"; then
114 $ECHO "gnunet-daemon-pt:gnunet-daemon-pt:${LINENO}: newargv[0]: $progdir/$program" 1>&2
115 func_lt_dump_args ${1+"$@"} 1>&2
116 fi
117 exec "$progdir/$program" ${1+"$@"}
118
119 $ECHO "$0: cannot exec $program $*" 1>&2
120 exit 1
121}
122
123# A function to encapsulate launching the target application
124# Strips options in the --lt-* namespace from $@ and
125# launches target application with the remaining arguments.
126func_exec_program ()
127{
128 case " $* " in
129 *\ --lt-*)
130 for lt_wr_arg
131 do
132 case $lt_wr_arg in
133 --lt-*) ;;
134 *) set x "$@" "$lt_wr_arg"; shift;;
135 esac
136 shift
137 done ;;
138 esac
139 func_exec_program_core ${1+"$@"}
140}
141
142 # Parse options
143 func_parse_lt_options "$0" ${1+"$@"}
59 144
60 # Find the directory that this script lives in. 145 # Find the directory that this script lives in.
61 thisdir=`$ECHO "X$file" | $Xsed -e 's%/[^/]*$%%'` 146 thisdir=`$ECHO "$file" | /bin/sed 's%/[^/]*$%%'`
62 test "x$thisdir" = "x$file" && thisdir=. 147 test "x$thisdir" = "x$file" && thisdir=.
63 148
64 # Follow symbolic links until we get to the real thisdir. 149 # Follow symbolic links until we get to the real thisdir.
65 file=`ls -ld "$file" | /bin/sed -n 's/.*-> //p'` 150 file=`ls -ld "$file" | /bin/sed -n 's/.*-> //p'`
66 while test -n "$file"; do 151 while test -n "$file"; do
67 destdir=`$ECHO "X$file" | $Xsed -e 's%/[^/]*$%%'` 152 destdir=`$ECHO "$file" | /bin/sed 's%/[^/]*$%%'`
68 153
69 # If there was a directory component, then change thisdir. 154 # If there was a directory component, then change thisdir.
70 if test "x$destdir" != "x$file"; then 155 if test "x$destdir" != "x$file"; then
@@ -74,11 +159,10 @@ else
74 esac 159 esac
75 fi 160 fi
76 161
77 file=`$ECHO "X$file" | $Xsed -e 's%^.*/%%'` 162 file=`$ECHO "$file" | /bin/sed 's%^.*/%%'`
78 file=`ls -ld "$thisdir/$file" | /bin/sed -n 's/.*-> //p'` 163 file=`ls -ld "$thisdir/$file" | /bin/sed -n 's/.*-> //p'`
79 done 164 done
80 165
81
82 # Usually 'no', except on cygwin/mingw when embedded into 166 # Usually 'no', except on cygwin/mingw when embedded into
83 # the cwrapper. 167 # the cwrapper.
84 WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=no 168 WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=no
@@ -89,7 +173,7 @@ else
89 fi 173 fi
90 # remove .libs from thisdir 174 # remove .libs from thisdir
91 case "$thisdir" in 175 case "$thisdir" in
92 *[\\/].libs ) thisdir=`$ECHO "X$thisdir" | $Xsed -e 's%[\\/][^\\/]*$%%'` ;; 176 *[\\/].libs ) thisdir=`$ECHO "$thisdir" | /bin/sed 's%[\\/][^\\/]*$%%'` ;;
93 .libs ) thisdir=. ;; 177 .libs ) thisdir=. ;;
94 esac 178 esac
95 fi 179 fi
@@ -117,7 +201,7 @@ else
117 if test -n "$relink_command"; then 201 if test -n "$relink_command"; then
118 if relink_command_output=`eval $relink_command 2>&1`; then : 202 if relink_command_output=`eval $relink_command 2>&1`; then :
119 else 203 else
120 echo "$relink_command_output" >&2 204 printf %s\n "$relink_command_output" >&2
121 rm -f "$progdir/$file" 205 rm -f "$progdir/$file"
122 exit 1 206 exit 1
123 fi 207 fi
@@ -132,17 +216,13 @@ else
132 if test -f "$progdir/$program"; then 216 if test -f "$progdir/$program"; then
133 if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then 217 if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then
134 # Run the actual program with our arguments. 218 # Run the actual program with our arguments.
135 219 func_exec_program ${1+"$@"}
136 exec "$progdir/$program" ${1+"$@"}
137
138 $ECHO "$0: cannot exec $program $*" 1>&2
139 exit 1
140 fi 220 fi
141 else 221 else
142 # The program doesn't exist. 222 # The program doesn't exist.
143 $ECHO "$0: error: \`$progdir/$program' does not exist" 1>&2 223 $ECHO "$0: error: \`$progdir/$program' does not exist" 1>&2
144 $ECHO "This script is just a wrapper for $program." 1>&2 224 $ECHO "This script is just a wrapper for $program." 1>&2
145 echo "See the libtool documentation for more information." 1>&2 225 $ECHO "See the libtool documentation for more information." 1>&2
146 exit 1 226 exit 1
147 fi 227 fi
148fi 228fi