View Single Post
  #3   (View Single Post)  
Old 23rd May 2008
amac amac is offline
New User
 
Join Date: May 2008
Posts: 2
Default

Quote:
Originally Posted by jggimi View Post
  • /etc/rc.conf and /etc/rc.conf.local are only used to set variables. They are not for command execution. Therefore, your two lines won't work as written, only the last line will be used.

    For 4.3, please refer to /etc/rc line 219 and /etc/rc.conf lines 104-106 to see how /etc/rc.conf and /etc/rc.conf.local are used.
  • The easiest solution is to start your multiple ftp-proxy sessions from /etc/rc.local. See /etc/rc lines 678-680 to see how ftp-proxy is started.
I'm working on 4.2, so I think there are some differences....

/etc/rc line 219
Code:
RULES="$RULES\npass out inet6 proto icmp6 all icmp6-type neighbrsol"

which isn't it, and i'm not sure what your after there.. the only lines that have ftp-proxy in /etc/rc is 652->654:
Code:
652 if [ X"${ftpproxy_flags}" != X"NO" ]; then
653         echo -n ' ftp-proxy';           /usr/sbin/ftp-proxy ${ftpproxy_flags}
654 fi

....and your saying to start my multiple ftp-proxy instances via rc.local, which I guess makes sense (sorry, I'm clearly not familiar with BSD rc* files / scripts).


So..... for those of you who are trying to do this same thing I'm after here, I've removed what I had in /etc/rc.conf.local, and modified /etc/rc.local... (my current rc.local below)


Code:
#       $OpenBSD: rc.local,v 1.39 2006/07/28 20:19:46 sturm Exp $

# Site-specific startup actions, daemons, and other things which
# can be done AFTER your system goes into securemode.  For actions
# which should be done BEFORE your system has gone into securemode
# please see /etc/rc.securelevel.

echo -n 'starting local daemons:'

# Add your local startup actions here.
/usr/bin/ftp-proxy -R 10.1.1.14 -p 21 -b 63.231.0.14
/usr/bin/ftp-proxy -R 10.1.1.53 -p 21 -b 63.231.0.53



echo '.'

After sourcing rc.local, things are looking good:


Code:
fw# . /etc/rc.local 
starting local daemons:
.

fw# lsof -ni:21
COMMAND     PID  USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
ftp-proxy 20686 proxy    3u  IPv4 0xfffffe8009fd5228      0t0  TCP 63.231.0.53:ftp (LISTEN)
ftp-proxy 20848 proxy    3u  IPv4 0xfffffe8009fd5000      0t0  TCP 63.231.0.14:ftp (LISTEN)
fw#
w00t... thanks jggimi
Reply With Quote