13 cat >$d1/tinc-up <<EOF
15 read pid rest <$d1/pid
16 (sleep 0.1; kill \$pid) &
19 cat >$d1/tinc-up.cmd <<EOF
20 start /min ../$tinc $c1 stop
23 # Test tincd command line options that should work
26 $tincd $c1 $r1 --no-detach
29 $tincd $c1 $r1 -D -d 2
30 $tincd $c1 $r1 -D -n foo
31 $tincd $c1 $r1 -D -nfoo
32 $tincd $c1 $r1 -D --net=foo
33 $tincd $c1 $r1 -D --net foo
35 # Test tincd command line options that should not work
37 $tincd $c1 $r1 foo && exit 1 || true
38 $tincd $c1 $r1 --pidfile && exit 1 || true
39 $tincd $c1 $r1 --foo && exit 1 || true
41 # Test tinc command line options that should work
44 $tinc $c1 -n foo get name
45 $tinc $c1 -nfoo get name
46 $tinc $c1 --net=foo get name
47 $tinc $c1 --net foo get name
49 # Test tinc command line options that should not work
51 $tinc $c1 -n foo get somethingreallyunknown && exit 1 || true
52 $tinc $c1 --net && exit 1 || true
53 $tinc $c1 --net get name && exit 1 || true
54 $tinc $c1 foo && exit 1 || true