File tree Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ ln -s tailscaled "/${PREFIX?}/local/sbin/tailscale"
5454< tailscale.xml sed " s/@@PREFIX@@/${PREFIX?} /" > import.xml
5555svccfg import import.xml
5656svccfg -s vpn/tailscale setprop application/binary=" /${PREFIX?} /local/sbin/tailscaled"
57+ svccfg -s vpn/tailscale setprop application/tun_driver=" tun"
5758svcadm enable -st vpn/tailscale
5859rm tailscale.xml import.xml
5960
@@ -62,3 +63,7 @@ rm -rf "${TMPDIR}"
6263
6364sleep 2
6465tailscale status
66+
67+ echo " To switch to non-tun userspace networking you can run:"
68+ echo ' svccfg -s vpn/tailscale setprop application/tun_driver="userspace-networking"'
69+ echo " and then restart tailscale"
Original file line number Diff line number Diff line change 1717 <exec_method name =' stop' type =' method' exec =' /@@PREFIX@@/local/lib/svc/method/vpn-tailscale %m %{restarter/contract}' timeout_seconds =' 5' />
1818 <property_group name =' application' type =' application' >
1919 <propval name =' binary' type =' astring' value =' /@@PREFIX@@/local/sbin/tailscaled' />
20+ <propval name =' tun_driver' type =' astring' value =' tun' />
2021 </property_group >
2122 <stability value =' Evolving' />
2223 <template >
Original file line number Diff line number Diff line change 33
44. /lib/svc/share/smf_include.sh
55
6- TAILSCALED=$( svcprop -p application/binary $SMF_FMRI )
6+ TAILSCALED=$( svcprop -c -p application/binary " $SMF_FMRI " )
7+ TUN_DRIVER=$( svcprop -c -p application/tun_driver " $SMF_FMRI " )
78case " $1 " in
89start)
910 smf_clear_env
10- " ${TAILSCALED?} " &
11+ " ${TAILSCALED?} " -tun " ${TUN_DRIVER?} " &
1112 ;;
1213stop)
13- smf_kill_contract $2 TERM 60
14+ smf_kill_contract " $2 " TERM 60
1415 " ${TAILSCALED?} " --cleanup
1516 ;;
1617* )
1920 ;;
2021esac
2122
22- exit $SMF_EXIT_OK
23+ exit " $SMF_EXIT_OK "
You can’t perform that action at this time.
0 commit comments