Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

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".

share|improve this answer
    
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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