On 2023-04-25 10:45, rea...@catastrophe.net wrote:
> After upgrading to 7.3 autossh is failing using the following rc script
> in /etc/rc.d/autossh.  It looks like maybe switching to $daemon_user is
> not happening to find the correct ssh config stanzas? Thanks in advance
> for any help.
> 
> 
> ## Startup configuration
> 
> #!/bin/ksh
> # start autossh tunnel
> # requires remoteuser user with $HOME/.ssh/config and keys
> 
> daemon="/usr/local/bin/autossh"
> daemon_flags_1="-M 0 -f -N tun-remoteA"
> daemon_flags_1="-M 0 -f -N tun-remoteB"
> daemon_user="remoteuser"
> 
> . /etc/rc.d/rc.subr
> 
> rc_reload=NO
> 
> pexp="autossh:.*"
> 
> # Child will not return a config parsing error to the parent.
> rc_start() {
>         # use rcexec here since daemon_flags may contain arguments with spaces
>         ${rcexec} "${daemon} ${daemon_flags_1}" && \
>         ${rcexec} "${daemon} ${daemon_flags_1}"
> }
> 
> rc_cmd $1

${rcexec} was deprecated in 7.2 and dropped in 7.3. You have to use
rc_exec now.

# sed -i 's/\${rcexec}/rc_exec/' /etc/rc.d/autossh

https://www.openbsd.org/faq/upgrade72.html#ConfigChanges
https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/etc/rc.d/rc.subr.diff?r1=1.159&r2=1.160&f=h

Reply via email to