0

I'm using tb_userspace provided by tb-tun to use HE.net's tunnelbroker service in an openvz vps, but all references and how-tos are telling me to do something like:

setsid /path/to/tb_userspace ipv6 SERVER.ADDRESS

I do have this running correctly if I run it in a shell myself, and then bring the interface up and set correct route using ifconfig:

ifconfig ipv6 up
ifconfig ipv6 inet6 add CLIENT.IP/64
ifconfig ipv6 mtu 1480
route -A inet6 add ::/0 dev ipv6

But when I put all of this into /etc/rc.local, strange thing happen: All commands after tb_userspace are ignored and not executed, but the tb_userspace does run correctly. So I have to run the other four commands manually every time after a reboot.

Any suggestion on this? Many thanks.

1

Here's a diagnostic that I often find useful with rc scripts. Change this:

#!/bin/sh

command1
confusing_command2
confusing_command3

To:

#!/bin/sh

set -x
exec > /tmp/rc-stuff.out 2>&1
command1
confusing_command2
confusing_command3

...Then after a boot, inspect /tmp/rc-stuff.out to see what's happening during the boot.

...Also, make sure your rc script isn't running forever using the ps command, like "ps axf".

1
  • Argh, thanks! I tried it and it stops at the tb_userspace line, and using ps axf shows the script is running forever... but I do not get this result if I run the setsid line in shell myself, what could be problem?
    – Felix Yan
    Dec 7 '11 at 6:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.